IFrame Seamless attribute should allow for disabling features

After reading the HTML5 specification on the seamless attribute of the iframe element, I believe the seamless attribute to be too narrowly considered.

It seems, the seamless attribute basically enables three features:

* automatic iframe height calculation
* CSS integration
* DOM integration

I see a problem in integrating the later two. So I would like to suggest the seamless attribute to become a comma separated list of above three Seamless properties to be enabled. For backward compatibility to HTML5, if the attribute value equals "seamless", all three properties should be enabled.


Here's my reason for this suggestion:

I'm using iframe elements to render micro parts of a web page, e. g. a data grid, without requiring much JavaScript ado. In the following I call these iframe micro page elements "controls".

In our web application I'm inserting arbitrary iframe controls into several web pages.

If the page's CSS would have influence on the iframe control's rendering, then it would be necessary to test each and every iframe control on each and every page where the iframe control could possibly be inserted (probably database driven), because some CSS on any particular page might have bad influence on the iframe control's content.

So I would prefer to just add an additional <link> element (the application's CSS) to the iframe control's HTML content and still be sure that there won't be any other CSS influencing the iframe control's HTML presentation.


Same for DOM integration: jQuery selectors may find elements not intended to be found if both, the page's and the iframe controls' DOM trees would be merged.

The current definition results in a testing hell, from my perspective.


So I suggest that any of the above three seamless features may be optionally applicable.

Possible seamless attribute values may be (just suggesting some names here):

    autoheight   =   sets the iframe's height to the minimum height necessary to omit a scrollbar
    cssinclude   =   have the page content's CSS being prepended to the iframe content's CSS
    dominclude   =   have the iframe content's DOM integrate with the page content's DOM
    seamless     =   "autoheight,cssinclude,dominclude"

attribute seamless = [ autoheight || cssinclude || dominclude ] | seamless

Regards,
Axel Dahmen 

Received on Monday, 14 April 2014 14:38:46 UTC