| 1. |
Explain About Event Delegate? |
|
Answer» Even DELEGATION is useful concept where event handler is attached to one top level element instead of multiple elements on the DOM. This will improve application memory efficiency and should be used WHENEVER possible. This is simple example of using event delegation with Aurelia framework. Our view will have a button with click.delegate event attached. app.html Once the button is clicked, myFunction() will be called. app.js export class App Even delegation is useful concept where event handler is attached to one top level element instead of multiple elements on the DOM. This will improve application memory efficiency and should be used whenever possible. This is simple example of using event delegation with Aurelia framework. Our view will have a button with click.delegate event attached. app.html Once the button is clicked, myFunction() will be called. app.js export class App |
|