Class HTMLIFrameElement

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

public class HTMLIFrameElement extends HTMLElement
A JavaScript object for HtmlInlineFrame.
See Also:
  • Field Details

    • isAttachedToPageDuringOnload_

      private boolean isAttachedToPageDuringOnload_
      During setOnload(Object), was the element attached to the page.
  • Constructor Details

    • HTMLIFrameElement

      public HTMLIFrameElement()
      Creates an instance.
  • Method Details

    • jsConstructor

      public void jsConstructor()
      JavaScript constructor.
      Overrides:
      jsConstructor in class HTMLElement
    • getSrc

      public String getSrc()
      Returns the value of URL loaded in the frame.
      Returns:
      the value of this attribute
    • setSrc

      public void setSrc(String src)
      Sets the value of the source of the contained frame.
      Parameters:
      src - the new value
    • getContentDocument

      public DocumentProxy getContentDocument()
      Returns the document the frame contains, if any.
      Returns:
      null if no document is contained
      See Also:
    • getContentWindow

      public WindowProxy getContentWindow()
      Returns the window the frame contains, if any.
      Returns:
      the window
      See Also:
    • getName

      public String getName()
      Returns the value of the name attribute.
      Overrides:
      getName in class HTMLElement
      Returns:
      the value of this attribute
    • setName

      public void setName(String name)
      Sets the value of the name attribute.
      Overrides:
      setName in class HTMLElement
      Parameters:
      name - the new value
    • getFrame

      private BaseFrameElement getFrame()
    • setOnload

      public void setOnload(Object eventHandler)
      Sets the onload event handler for this element.
      Overrides:
      setOnload in class HTMLElement
      Parameters:
      eventHandler - the onload event handler for this element
    • getAlign

      public String getAlign()
      Returns the value of the align property.
      Returns:
      the value of the align property
    • setAlign

      public void setAlign(String align)
      Sets the value of the align property.
      Parameters:
      align - the value of the align property
    • getWidth_js

      public String getWidth_js()
      Returns the value of the width property.
      Returns:
      the value of the width property
    • setWidth_js

      public void setWidth_js(String width)
      Sets the value of the width property.
      Parameters:
      width - the value of the width property
    • getHeight_js

      public String getHeight_js()
      Returns the value of the width property.
      Returns:
      the value of the width property
    • setHeight_js

      public void setHeight_js(String height)
      Sets the value of the height property.
      Parameters:
      height - the value of the height property
    • executeEventLocally

      public void executeEventLocally(Event event)
      Executes the event on this object only (needed for instance for onload on (i)frame tags).
      Overrides:
      executeEventLocally in class EventTarget
      Parameters:
      event - the event
      See Also:
    • onRefresh

      public void onRefresh()
      To be called when the frame is being refreshed.