Module org.htmlunit

Class HtmlEmbed

All Implemented Interfaces:
Serializable, Cloneable, Element, Node

public class HtmlEmbed extends HtmlElement
Wrapper for the HTML element "embed".
Author:
Ahmed Ashour, Ronald Brill, Frank Danek
See Also:
  • Field Details

  • Method Details

    • onAddedToPage

      protected void onAddedToPage()
      Lifecycle method invoked whenever a node is added to a page. Intended to be overridden by nodes which need to perform custom logic when they are added to a page. This method is recursive, so if you override it, please be sure to call super.onAddedToPage(). Hides the nonce attribute if required by the Content-Security-Policy. Checks the src url against the Content-Security-Policy (object-src).
      Overrides:
      onAddedToPage in class DomElement
    • setAttributeNS

      protected void setAttributeNS(String namespaceURI, String qualifiedName, String value, boolean notifyAttributeChangeListeners, boolean notifyMutationObservers)
      Sets the value of the attribute specified by namespace and qualified name. Checks the new src url against the Content-Security-Policy (object-src).
      Overrides:
      setAttributeNS in class HtmlElement
      Parameters:
      namespaceURI - the URI that identifies an XML namespace
      qualifiedName - the qualified name (prefix:local) of the attribute
      value - the value of the attribute
      notifyAttributeChangeListeners - to notify the associated HtmlAttributeChangeListeners
      notifyMutationObservers - to notify MutationObservers or not
    • saveAs

      public void saveAs(File file) throws IOException
      Saves this content as the specified file.
      Parameters:
      file - the file to save to
      Throws:
      IOException - if an IO error occurs
    • getDefaultStyleDisplay

      public HtmlElement.DisplayStyle getDefaultStyleDisplay()
      INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
      Returns the default display style.
      Overrides:
      getDefaultStyleDisplay in class HtmlElement
      Returns:
      the default display style