<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:xbl='http://www.w3.org/ns/xbl'
      xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <head>
    <title>XBL 2.0 Test Suite: Handler test - phase</title>
    <style type='text/css'>
     #bound { background-color: red; }
    </style> 
    <xbl xmlns="http://www.w3.org/ns/xbl">
     <binding id="b2" element="#bound">
      <handlers>
        <handler id="hand1" event="click" button="0">
         event.currentTarget.setAttribute("style", "background-color: "+document.getElementById("variable").getAttribute("value")+";");
        </handler>
      </handlers>
    </binding>
     <binding id="b2" element="#variable">
      <handlers>
        <handler id="hand1" event="click" button="0" phase="capture">
         document.getElementById("variable").setAttribute("value", "green");
        </handler>
      </handlers>
    </binding>
    </xbl> 
  </head>
  <body> 
   <span id="variable" value="red">
    <span id="bound">
     Click here. First click should change this to green, NOT THE SECOND.
    </span>
   </span>
  </body>
</html>
