문제

main.xul

<?xml version="1.0"?>
<?xml-stylesheet href="main.css" type="text/css"?>

<window id="main" class="MainClass" title="MY TEST" width="640" height="480" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <listbox id="mainList" flex="1" class="MainListbox">
        <listitem label="Twitter"/>
        <listitem label="YouTube" id="youtubeID" class="YoutubeClass" oncommand="document.getElementById('youtubeID').startYoutube()"/>
    </listbox>
</window>

main.css

.YoutubeClass {
 -moz-binding: url("main.xml#youtubeStarter");
}

main.xml

<?xml version="1.0"?>

<bindings xmlns="http://www.mozilla.org/xbl">
    <binding id="youtubeStarter">
            <!-- empty -->
    </binding>
</bindings>

If I delete the -moz-binding: url('main.xml#youtubeStarter'); from the CSS, the Youtube item shows up.. Any idea why with this line the Youtube item hides?

도움이 되었습니까?

해결책

Got it: when you add a binding (with -moz-binding in css) it will override the content of that component with the content specified in the tag of the binding. If you do not have a tag (my case) you will have no content.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top