Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Set Sandbox attribute on iFrame created by htmlPane

    I need to actions within an htmlpane that would result in changing the page location.
    Thanks to html5, iFrames naitively support this with the "sandbox" attribute;

    I tried using this jQuery but adding the sandbox flag to an existing iFrame does not work without rebuilding the iFrame. Is there an isomorphic solution to this problem?
    $(".urlPane iframe").each(function () { $(this).attr('sandbox', ''); });

    #2
    You would currently have to override getInnerHTML() on the HTMLFlow to cause this attribute to be output. The safest way to do this would be to call super and modify the generated HTML to add the sandbox attribute, then return that.

    We'll add an attribute in the next version to make this easier.

    Comment


      #3
      worked perfectly. Thank you

      Comment


        #4
        In tomorrow's nightly build (Feb 22th) of SC 6.1 you'll find a new attribute of HTMLFlow, "iframeSandbox", that will ease this use case.

        Comment

        Working...
        X