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 Details

    • of

      public static JavaScriptEvent of(Map<String,String> attributes, String javascriptUrl)
      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

      @Exported public Map<String,String> getAttributes()
      The attributes to add to the element as data-attributes. e.g. type, or testid.
    • getJavascriptUrl

      @Exported public String getJavascriptUrl()
      The URL of the JavaScript to load.