You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/src/compile/nodes/Body.ts

24 lines
506 B

import Node from './shared/Node';
import EventHandler from './EventHandler';
export default class Body extends Node {
type: 'Body';
handlers: EventHandler[];
constructor(component, parent, scope, info) {
super(component, parent, scope, info);
this.handlers = [];
info.attributes.forEach(node => {
if (node.type === 'EventHandler') {
this.handlers.push(new EventHandler(component, this, scope, node));
}
else {
// TODO there shouldn't be anything else here...
}
});
}
}