haiku/docs/interface_guidelines/docbook-css/db-bindings.xml
Augustin Cavalier 7d6915b4d0 Interface Guidelines: migrate to docs/, use DocBookCSS.
DocBookCSS is a mostly-pure-CSS2 implementation of the DocBook standard.
Unlike DocBookXSL which relies on transforming the XML, it utilizes the
XML-styling features of modern web browsers to display the DocBook.

Its appearance still is a long way from the Haiku Book and Userguide, but
it looks (mostly) the same as the old DocBookXSL so we can stop using that.
Eventually we just need to make DocBookCSS use our styling.
2015-02-12 17:08:04 -05:00

32 lines
939 B
XML

<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="ulink">
<handlers>
<handler event="click" button="0"
action="window.location=this.attributes.url.value;"/>
<handler event="mouseover"
action="window.status=this.attributes.url.value;"/>
<handler event="mouseout"
action="window.status=null;"/>
</handlers>
</binding>
<binding id="image">
<content>
<html:img xbl:inherits="src=fileref"/>
</content>
<implementation>
<constructor>
var img = document.getAnonymousNodes(this)[0];
var file = this.getAttribute("fileref");
// HACK: using img.src=file 'inline' doesn't seem to work
// but it does when called from a setTimeout()
var f = function() { img.src = file; }
setTimeout(f, 0);
</constructor>
</implementation>
</binding>
</bindings>