Class ElementJsInitializerRegistration

java.lang.Object
com.vaadin.flow.dom.impl.ElementJsInitializerRegistration
All Implemented Interfaces:
Registration, Serializable

public final class ElementJsInitializerRegistration extends Object implements Registration
Server-side bookkeeping for a JavaScript initializer registered through Element.addJsInitializer(String, Object...).

Re-emits the init invocation each time the client acquires a fresh DOM for this element, and emits a matching dispose when the registration is removed. The user expression is sent as a JsFunction parameter; the wrapper expression itself contains only framework code that delegates registry bookkeeping to this.registerInitializer / this.disposeInitializer, which the client provides as part of the executeJs execution context.

For internal use only.

See Also:
  • Constructor Details

    • ElementJsInitializerRegistration

      public ElementJsInitializerRegistration(StateNode node, String expression, Object[] parameters)
      Creates a new registration and schedules the first init invocation if the node is currently attached.
      Parameters:
      node - the owning state node, not null
      expression - the user-supplied expression, not null
      parameters - the user-supplied parameters, captured by the JsFunction
  • Method Details