|
|
@ -24,9 +24,7 @@ export default function add_event_handlers(
|
|
|
|
} else if (handler.name === '$$any') {
|
|
|
|
} else if (handler.name === '$$any') {
|
|
|
|
block.any_event_elements.push(target);
|
|
|
|
block.any_event_elements.push(target);
|
|
|
|
// This isn't required but listen is treeshaken otherwise
|
|
|
|
// This isn't required but listen is treeshaken otherwise
|
|
|
|
block.event_listeners.push(
|
|
|
|
block.event_listeners.push(`@listen`);
|
|
|
|
`@listen(${target}, "${handler.name}", ${snippet})`
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
block.event_listeners.push(
|
|
|
|
block.event_listeners.push(
|
|
|
|
`@listen(${target}, "${handler.name}", ${snippet})`
|
|
|
|
`@listen(${target}, "${handler.name}", ${snippet})`
|
|
|
|