Class CloseEvent

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

    public class CloseEvent
    extends Event
    A JavaScript object for CloseEvent.
    See Also:
    Serialized Form
    • Field Detail

      • reason_

        private java.lang.String reason_
      • code_

        private int code_
      • wasClean_

        private boolean wasClean_
    • Constructor Detail

      • CloseEvent

        public CloseEvent()
        Creates a new event instance.
    • Method Detail

      • eventCreated

        public void eventCreated()
        Called whenever an event is created using Document.createEvent(..). This method is called after the parent scope was set so you are able to access the browser version.
        Overrides:
        eventCreated in class Event
      • jsConstructor

        public void jsConstructor​(java.lang.String type,
                                  org.htmlunit.corejs.javascript.ScriptableObject details)
        JavaScript constructor.
        Overrides:
        jsConstructor in class Event
        Parameters:
        type - the event type
        details - the event details (optional)
      • getCode

        public int getCode()
        Returns:
        the code
      • setCode

        public void setCode​(int code)
        Parameters:
        code - the code
      • getReason

        public java.lang.String getReason()
        Returns:
        the reason
      • setReason

        public void setReason​(java.lang.String reason)
        Parameters:
        reason - the reason
      • isWasClean

        public boolean isWasClean()
        Returns:
        the wasClean
      • setWasClean

        public void setWasClean​(boolean wasClean)
        Parameters:
        wasClean - the wasClean