Package com.vaadin.flow.dom
Interface Element.ElementJs
- All Superinterfaces:
Serializable
- Enclosing class:
Element
JavaScript that Flow runs on an element, as a JavaScript definition for
Element.executeJs(Class).- Since:
- 25.4
-
Method Summary
Modifier and TypeMethodDescriptionvoidflashClass(String className) Adds the CSS class to the element and removes it again when the animation it starts has ended.voidDispatches awindow-resizeevent on the element whenever the browser window is resized, with the new browser window width and height (the viewport size, excluding scrollbars) as itswandhproperties, so that a resize can be listened to on the element.
-
Method Details
-
flashClass
Adds the CSS class to the element and removes it again when the animation it starts has ended.- Parameters:
className- the CSS class name to flash- See Also:
-
forwardWindowResize
@JsExpression("const el = this;\nwindow.addEventListener(\'resize\', evt => {\n const event = new Event(\"window-resize\");\n event.w = document.documentElement.clientWidth;\n event.h = document.documentElement.clientHeight;\n el.dispatchEvent(event);\n});\n") void forwardWindowResize()Dispatches awindow-resizeevent on the element whenever the browser window is resized, with the new browser window width and height (the viewport size, excluding scrollbars) as itswandhproperties, so that a resize can be listened to on the element.
-