- Companion:
- object
Value members
Concrete methods
This method is used by onMountBind to cancel this subscription on unmount
This method is used by onMountBind to cancel this subscription on unmount
- Definition Classes
Inherited methods
You can count on this method being a no-op in your libraries and end user code.
You can count on this method being a no-op in your libraries and end user code.
The reason this method is not abstract is to avoid broken SAM sugar in case of meta modifiers. See https://github.com/raquo/scala-dom-types/issues/27
- Definition Classes
- Inherited from:
- Binder
Concrete fields
To make sure that you remove the event listener successfully in JS DOM, you need to provide the same Javascript callback function that was originally added as a listener. However, the implicit conversion from a Scala function to a JS function creates a new JS function every time, so we would never get referentially equal JS functions if we used the Scala-to-JS conversion more than once. Therefore, we need to perform that conversion only once and save the result. This method encapsulates such conversion.
To make sure that you remove the event listener successfully in JS DOM, you need to provide the same Javascript callback function that was originally added as a listener. However, the implicit conversion from a Scala function to a JS function creates a new JS function every time, so we would never get referentially equal JS functions if we used the Scala-to-JS conversion more than once. Therefore, we need to perform that conversion only once and save the result. This method encapsulates such conversion.