Package jenkins.model.menu.event
Class JavaScriptEvent
java.lang.Object
jenkins.model.menu.event.JavaScriptEvent
- All Implemented Interfaces:
Event
@ExportedBean
@Restricted(org.kohsuke.accmod.restrictions.Beta.class)
public final class JavaScriptEvent
extends Object
implements Event
When the event is rendered the javascriptUrl will be loaded.
Attributes are attached to the button or link as data-attributes.
-
Method Summary
Modifier and TypeMethodDescriptionThe attributes to add to the element as data-attributes.The URL of the JavaScript to load.static JavaScriptEventCreate a JavaScriptEvent.
-
Method Details
-
of
Create a JavaScriptEvent.- Parameters:
attributes- attributes to add to the element as data-attributes.javascriptUrl- the script to load relative from the jenkins root url.- Returns:
- the event
-
getAttributes
The attributes to add to the element as data-attributes. e.g. type, or testid. -
getJavascriptUrl
The URL of the JavaScript to load.
-