Open
Bug 914082
Opened 13 years ago
Updated 3 years ago
xul:browser in Firefox tab --> NS_ERROR_FAILURE and no "pageshow" event triggered
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: piotrekrom7, Unassigned)
Details
Attachments
(1 file)
|
3.86 KB,
application/x-xpinstall
|
Details |
When I try open a xul page with <browser> element I see NS_ERROR_FAILURE in console. Also "pageshow" event isn't triggered for the <browser> for me. (unless it's normal and I don't know about it)
But when I open the xul page in own window (i.e. outside Firefox window) using window.openDialog("chrome://adress.xul") I don't see the error and "pageshow" is triggered.
I tried all possible values of "type" attribute: content, content-primary, content-targetable and chrome.
I created test extension with problematic xul page. Test xul page is at chrome://browserpageshoweventtest/content/test/test.xul. I don't see bug after window.openDialog("chrome://browserpageshoweventtest/content/test/test.xul"); in context of main Firefox window.
The error:
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.sessionHistory]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://global/content/bindings/browser.xml :: :: line 724" data: no]
Source file: chrome://global/content/bindings/browser.xml
Line: 731
XUL (test.xul):
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE window>
<window id="test1"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoad();">
<script type="application/javascript" src="test.js"/>
<browser id="content" type="content-primary" src="about:blank" flex="1"/>
</window>
JS (test.js):
const Cc = Components.classes;
const Ci = Components.interfaces;
function onLoad()
{
console.log("window - onload")
window.gBrowser = document.getElementById("content");
gBrowser.addEventListener("pageshow", onBrowserPageShow, true);
runTest();
}
function onBrowserPageShow()
{
alert("xul:browser - onpageshow");
console.log("xul:browser - onpageshow");
}
function expectedResult()
{
gBrowser.dispatchEvent(new Event("pageshow"));
}
function runTest()
{
gBrowser.loadURI("about:home");
}
| Reporter | ||
Comment 1•13 years ago
|
||
I tested it with my FF Portable 23.0.1 and with Nightly 26.0a1 (2013-09-08) (on Nightly only type="content-primary")
Attachment #801487 -
Attachment mime type: application/octet-stream → application/x-xpinstall
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•