File: db-bindings.xml

package info (click to toggle)
xhtmlrenderer 0.0~R8%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 11,288 kB
  • ctags: 7,218
  • sloc: java: 46,036; xml: 1,518; makefile: 27; sh: 11
file content (31 lines) | stat: -rw-r--r-- 939 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?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>