<?xml version="1.0"   encoding="ISO-8859-1"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="counter_xbl.css" type="text/css"?>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init()"
>
<script type="text/javascript">

function init(){

  /* when the document is loading, we get the simplecounter element, and
  can call methods that are defined in the interface of the XBL component */

  var cnt= document.getElementById('mycounter');

  cnt.increment();
  cnt.increment();
  cnt.increment();

}


</script>

  <description>This is a counter using an xbl component in xul file</description>

  <!-- this tag is bind to an xbl component via CSS -->
  <simplecounter caption="My Counter" id="mycounter" countvalue="7" />

</window>