home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
AIMP2
/
aimp_2.61.583.exe
/
$TEMP
/
YandexPackSetup.msi
/
filAD6AB6B25CB026C6175ACCDF474168FE
< prev
next >
Wrap
Extensible Markup Language
|
2010-07-12
|
2KB
|
69 lines
<?xml version="1.0"?>
<!DOCTYPE bindings SYSTEM "chrome://yasearch/locale/dialogs/welcome.dtd">
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="scrollbar" extends="chrome://global/content/bindings/scrollbar.xml#scrollbar">
<resources>
<stylesheet src="chrome://yasearch/skin/dialogs/scrollbar.css"/>
</resources>
<implementation>
<field name="friend">document.getElementById("ya-status-textarea")</field>
<property name="maxpos" onset="this.setAttribute('maxpos', val);" onget="return this.getAttribute('maxpos');"/>
<property name="curpos" onset="this.setAttribute('curpos', val);" onget="return this.getAttribute('curpos');"/>
<constructor><![CDATA[
this.setAttribute("hidden", "true");
this.friend.style.marginRight = "-" + (this.friend.offsetWidth - this.friend.clientWidth) + "px";
function bind(handler, context) {
var __arguments__ = arguments;
return function() { return handler.call(context, Array.slice.call(__arguments__, 2)); };
}
var events = ["scroll", "change", "keydown", "keypress", "cut", "paste"];
for (var i = events.length; i--;)
this.friend.addEventListener(events[i], bind(this.update, this), true);
this.friend.addEventListener("overflow", bind(this.onOverflow, this), true);
this.friend.addEventListener("underflow", bind(this.onUnderflow, this), true);
this.update();
]]></constructor>
<method name="update">
<body><![CDATA[
this.maxpos = this.friend.scrollHeight - this.friend.clientHeight;
this.curpos = this.friend.scrollTop;
]]></body>
</method>
<method name="onOverflow">
<body><![CDATA[
this.removeAttribute("hidden");
this.update();
]]></body>
</method>
<method name="onUnderflow">
<body><![CDATA[
this.setAttribute("hidden", "true");
]]></body>
</method>
</implementation>
<handlers>
<handler event="DOMAttrModified"><![CDATA[
this.friend.scrollTop = this.curpos;
]]></handler>
</handlers>
</binding>
</bindings>