aboutsummaryrefslogtreecommitdiff
path: root/static/vevent.ts
diff options
context:
space:
mode:
Diffstat (limited to 'static/vevent.ts')
-rw-r--r--static/vevent.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/static/vevent.ts b/static/vevent.ts
index e35c469f..4b6d44c6 100644
--- a/static/vevent.ts
+++ b/static/vevent.ts
@@ -3,7 +3,8 @@ import { parseDate } from './lib'
export {
VEvent, xml_to_vcal,
- RecurrenceRule
+ RecurrenceRule,
+ isRedrawable,
}
/* Something which can be redrawn */
@@ -11,6 +12,11 @@ interface Redrawable extends HTMLElement {
redraw: ((data: VEvent) => void)
}
+function isRedrawable(x: HTMLElement): x is Redrawable {
+ return 'redraw' in x
+}
+
+
class VEventValue {
type: ical_type
@@ -209,6 +215,10 @@ class VEvent {
this.registered.push(htmlNode);
}
+ unregister(htmlNode: Redrawable) {
+ this.registered = this.registered.filter(node => node !== htmlNode)
+ }
+
to_jcal(): JCal {
let out_properties: JCalProperty[] = []
console.log(this.properties);