Firefox Extension - Page can't call "addEventListener" of iframe that is created by content script
Categories
(WebExtensions :: General, defect)
Tracking
(Not tracked)
People
(Reporter: eadan.y, Unassigned)
Details
Steps to reproduce:
Use extension content-script to create and add an iframe to the DOM:
var iframeElement = window.document.createElement('iframe');
iframeElement.id = 'iframe-id';
iframeElement.style.cssText = 'display:none; visibility:hidden';
iframeElement.src = 'about:blank';
window.document.documentElement.appendChild(iframeElement);
Use a script on the page to find that iframe (by id).
call iframe.contentWindow.addEventListener - error is thrown.
Actual results:
iframe.contentWindow.addEventListener throws exception.
Note: using 'window.wrappedJSObject' instead of "window" to create the iframe - works.
Expected results:
iframe.contentWindow.addEventListener should work - it works in chrome.
Comment 1•3 years ago
|
||
Hello,
I’m from QA and I’m attempting to reproduce the issue in order to confirm it, however I’m having a bit of trouble with building the extension.
As such, would you mind providing the extension you used when encountering the issue and maybe some more detailed steps to reproduce?
I’m also going to change the component of the report to match the issue.
Thank you !
Comment 2•3 years ago
|
||
I cannot reproduce this issue; I am able to use frame.contentWindow.addEventListener
.
If you have reproduction steps that trigger this bug, please share the extension and steps to reproduce.
Description
•