The XBL CSS anchor just removes the tag methods

I want to extend the XUL browser tag in multiple ways, but whenever I link in CSS, it just removes the 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 a URI. I was hoping to put my bindings in the "bindings" directory in chrome / content.

I have a JS that calls the loadURI method of a browser tag that already works, but the moment I link a link to it, it mistakenly says that 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 made initially is much more complicated, but when it didn't work I just went with the 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>

      

Below is my chrome manifest. They 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 the XBL with CSS to #bwindow

+3


source to share





All Articles