Expanded CSS messages in the Console for warnings originating in iframes does not match the affected elements because the element query is done in the host page.
Bug 1549749 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Expanded CSS messages in the Console for warnings originating in iframes does not match the affected elements because the element query is done in the host page.
STR:
- Run this in a new tab:
`data:text/html,<style>iframe {width: 50vw; height: 50vh}</style><iframe src="https://bug1549749.bmoattachments.org/attachment.cgi?id=9063231"/>`
(it runs the attachment in an iframe)
- Open DevTools > Console
- Ensure the "CSS" filter is not enabled.
(if it is, disable it and start all over)
- Enable the "CSS" filter.
- Click to expand the CSS warning: `Error in parsing value for ‘display’. Declaration dropped.`
Expected:
There should be a `NodeList` of matched elements with one `<p>` element from the iframe.
Actual:
The `NodeList` is empty because the query is done in the host page, not the iframe.
You can follow the same STR by opening the [attachment](https://bug1549749.bmoattachments.org/attachment.cgi?id=9063231) directly to see the expected result.
Expanded CSS messages in the Console for warnings originating in iframes does not match the affected elements because the element query is done in the host page.
STR:
- Run this in a new tab:
`data:text/html,<style>iframe {width: 50vw; height: 50vh}</style><iframe src="https://bug1549749.bmoattachments.org/attachment.cgi?id=9063231"/>`
(it runs the attachment in an iframe)
- Open DevTools > Console
- Ensure the "CSS" filter is not enabled.
(if it is, disable it and start all over. See the note below)
- Enable the "CSS" filter.
- Click to expand the CSS warning: `Error in parsing value for ‘display’. Declaration dropped.`
Expected:
There should be a `NodeList` of matched elements with one `<p>` element from the iframe.
Actual:
The `NodeList` is empty because the query is done in the host page, not the iframe.
You can follow the same STR by opening the [attachment](https://bug1549749.bmoattachments.org/attachment.cgi?id=9063231) directly to see the expected result.
**Note**
There seems to be an issue with CSS warnings not showing consistently for the iframe if the "CSS" filter is enabled when the page is loaded. Disable the "CSS" filter in the Console, reload the page, then enable it to see CSS warnings for iframes.