Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init() {
this._super(...arguments);
this[IS_DISPATCHING_ATTRS] = false;
this[DIRTY_TAG] = createTag();
this[BOUNDS] = null;
if (DEBUG && this.renderer._destinedForDOM && this.tagName === '') {
let eventNames = [];
let eventDispatcher = getOwner(this).lookup('event_dispatcher:main');
let events = (eventDispatcher && eventDispatcher._finalEvents) || {};
// tslint:disable-next-line:forin
for (let key in events) {
let methodName = events[key];
if (typeof this[methodName] === 'function') {
eventNames.push(methodName);
}
}
// If in a tagless component, assert that no event handlers are defined
getTag({ args }: CustomComponentState): Tag {
if (isConst(args)) {
// returning a const tag skips the update hook (VM BUG?)
return createTag();
} else {
return args.tag;
}
}
getTag(): Tag {
if (ENV._DEBUG_RENDER_TREE) {
// returning a const tag skips the update hook (VM BUG?)
return createTag();
} else {
// an outlet has no hooks
return CONSTANT_TAG;
}
}
getTag({ args }: CustomComponentState): Tag {
if (isConst(args)) {
// returning a const tag skips the update hook (VM BUG?)
return createTag();
} else {
return args.tag;
}
}
getTag() {
if (ENV._DEBUG_RENDER_TREE) {
// returning a const tag skips the update hook (VM BUG?)
return createTag();
} else {
// an outlet has no hooks
return CONSTANT_TAG;
}
}
getTag() {
if (ENV._DEBUG_RENDER_TREE) {
// returning a const tag skips the update hook (VM BUG?)
return createTag();
} else {
// an outlet has no hooks
return CONSTANT_TAG;
}
}
init() {
this._super(...arguments);
this[RECOMPUTE_TAG] = createTag();
},
getTag(state: EngineState): Tag {
let tag: Tag = CONSTANT_TAG;
if (state.modelRef) {
tag = state.modelRef.tag;
}
if (ENV._DEBUG_RENDER_TREE && isConstTag(tag)) {
tag = createTag();
}
return tag;
}
tagFor(key: string): DirtyableTag {
let tag = this.tags[key];
return tag === undefined ? (this.tags[key] = createTag()) : tag;
}
}