UNPKG

mframejs

Version:
29 lines 1.32 kB
import * as tslib_1 from "tslib"; import { DOM } from './dom'; import { View, ViewController } from '../view/exported'; import { DebounceBehavior, ThrottleBehavior, SignalBehavior, TriggerBehavior } from '../behavior/exported'; import { IfAttribute, ValueAttribute, DelgateEventsAttribute, TriggerEventsAttribute, RepeatAttribute, MiscAttributes, CssAttribute, ModelAttribute } from '../attribute/exported'; import { createBindingContext } from '../binding/exported'; export class MF { constructor() { this.count = 0; if (!DOM.window.Reflect) { DOM.window.Reflect = Object; } this.register(ValueAttribute, IfAttribute, DelgateEventsAttribute, RepeatAttribute, MiscAttributes, CssAttribute, ModelAttribute, TriggerEventsAttribute, SignalBehavior, ThrottleBehavior, DebounceBehavior, TriggerBehavior); } setRootApp(app) { this.app = app; return this; } start(node) { return tslib_1.__awaiter(this, void 0, void 0, function* () { this.node = node; this.$view = new ViewController(node, null); View.parseAndCreateElement(this.app, this.node, createBindingContext(this), null, this.$view); }); } register(..._class) { } } //# sourceMappingURL=mf.js.map