Ticket #10950 (closed bug: invalid)
dynamic Iframe $.support
| Reported by: | hafkensite@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | support | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I use jQuery to create an iframe, and with a "javascript:parent.init(document,window)" url get a reference to the document and window instances of the iframe. These are stored as iDocument and iWindow.
When I create elements for the iframe (from the outer frame), I use $("<div>",iDocument). This works as expected.
I have need to know if the iframe uses boxModel, so I want to use $.support.boxModel (the iframe may have a different doctype than the parent). Sadly this does not work on the iframe. This is because the support values are computed when jQuery is instantiated.
This would indicate that any method that uses support values to determine its working might fail because of different doctype or encoding in the other document.
Change History
comment:2 Changed 18 months ago by timmywil
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to support
In order to run the support tests for the iframe, jQuery must be loaded in the iframe. The support tests only test the current document, which is intentional.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

An example of the code can be found here: http://jsfiddle.net/S9qya/15/
It seems that the different rendering modes provided by the Internet Explorer developer bar (IE9), do not work as expected. Because the two iframes always have the same boxmodel.
They do however change depending on the rendeing mode, while the support.boxModel value always is true.
With other IE versions this changes, but the problem remains.