I want to extend the XUL browser tag with some methods but whenever I make the link in CSS it just removes methods from the tag. I can't tell if this is because the URI is wrong, or if the XBL file is wrong. Even the simplest XBL does this so it must be the URI. I was hoping to put my bindings in a "bindings" directory in chrome/content.
I have some JS which calls the loadURI method of the browser tag in question which is already working but the minute I link the binding to it it errors out telling me there is no such method. Remove the CSS binding and it works again.
#bwindow{
-moz-binding: url("chrome://nameofmyapp/content/bindings/browser.xbl#sbrowser");
}
The XBL I did originally is much more complex but when it didn't work I just went with a simple one.
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="sbrowser" extends="xul:browser">
<content><xul:label value="blah" /></content>
</binding>
</bindings>
The following is my chrome manifest. These seem to work. The skin definitely does.
content nameofmyapp content/
skin nameofmyapp default/1.0 skin/default/
The browser tag looks like this
<browser onload="browserload()" id="bwindow" type="content" src="about:blank" flex="1"/>
Again everything works fine until I link in the XBL with CSS to #bwindow