Class IFrame

    • Method Detail

      • setUnsafeSrc

        public void setUnsafeSrc​(String src)
        Sets the source of the iframe without validating its scheme.

        Unlike setSrc(String), this method does not reject URLs based on the "safeUrlSchemes" configuration. Use it only for URLs that are fully under your control and known to be safe, such as a hard-coded javascript: or data: URL. Passing untrusted input here can expose the application to cross-site scripting (XSS) attacks.

        Parameters:
        src - Source URL.
        See Also:
        setSrc(String)
      • getSrc

        public String getSrc()
        Gets the source of the iframe.
        Returns:
        the source of the iframe.
      • setSrcdoc

        public void setSrcdoc​(String srcdoc)
        Sets the srcdoc of the iframe.
        Parameters:
        srcdoc - srcdoc URL.
      • getSrcdoc

        public Optional<String> getSrcdoc()
        Gets the srcdoc of the iframe.
        Returns:
        the srcdoc of the iframe.
      • setAllow

        public void setAllow​(String allow)
        Sets the allow property to specify a feature policy.
        Parameters:
        allow - the allow attribute value.
        See Also:
        Feature Policy.
      • getAllow

        public Optional<String> getAllow()
        Gets the value of allow attribute.
        Returns:
        the currently applied allow value.
      • setName

        public void setName​(String name)
        Sets the name attribute.
        Parameters:
        name - the value for the name attribute.
      • getName

        public Optional<String> getName()
        Gets the name attribute.
        Returns:
        the name attribute.
      • reload

        public void reload()
        Reloads the IFrame.