以å‰ã€ã“ã‚“ãªæƒ…å ±èª°ã‚‚å¿…è¦ã¨ã—ã¦ãªã„ã ã‚ã†ãªã‚ã¨æ€ã£ã¦æ—¥è¨˜ã«ãƒã‚¤ãƒ³ã‚¿ã ã‘書ã„ãŸã®ã§ã™ãŒã€ãƒ‹ãƒ¼ã‚ºãŒã‚るよã†ãªã®ã§ä¾‹ã‚‚å«ã‚ã¦ã¾ã¨ã‚ã¦ãŠãã¾ã™ã€‚
scrollbox ãªã©ã®å…ƒã‹ã‚‰ã‚¹ã‚¯ãƒãƒ¼ãƒ«ã•ã›ã‚‹ãŸã‚ã«ä½œã‚‰ã‚ŒãŸè¦ç´ ã§ã¯ãªã„ãŸã ã® box ã‚„ãªã‚“ã‹ã§ã‚‚〠CSS ã® overflow
プãƒãƒ‘ティを使ãˆã°ä¸èº«ã‚’スクãƒãƒ¼ãƒ«ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ã—ã‹ã—ã€ã“ã®æ–¹æ³•ã§ã‚¹ã‚¯ãƒãƒ¼ãƒ«ã§ãるよã†ã«ã—ãŸå ´åˆã§ã‚‚ã€ãƒžã‚¦ã‚¹ã®ãƒ›ã‚¤ãƒ¼ãƒ«ã‚¹ã‚¯ãƒãƒ¼ãƒ«ã§ã¯å†…容をスクãƒãƒ¼ãƒ«ã§ãã¾ã›ã‚“(Webページ上ã§CSSを使ã£ã¦ã€Œç–‘似フレームã€ã«ã—ã¦ã„ã‚‹å ´åˆã«èµ·ã“ã‚‹å•é¡Œã‚‚ã“ã‚Œã¨åŒã˜ï¼‰ã€‚以下ã¯ã€ã“ã®å•é¡Œã‚’自力ã§è§£æ±ºã—ã¦ã—ã¾ãŠã†ã¨ã„ã†è©±ã§ã™ã€‚
追記。ã“ã®å•é¡Œã¯2004/8/7付ã‘ã§ä¿®æ£ã•ã‚Œã¾ã—ãŸã€‚以下ã®æƒ…å ±ã¯ä»Šã¨ãªã£ã¦ã¯ã¾ã‚‹ã£ãり無駄骨ã§ã™ã®ã§ã€æš‡ã¤ã¶ã—ã«èªã‚€ç¨‹åº¦ã§ãƒ¨ãƒã‚·ã‚¯ã€‚
ホイールスクãƒãƒ¼ãƒ«ã§è¦ç´ ã®å†…容をスクãƒãƒ¼ãƒ«ã™ã‚‹ã«ã¯ã€è¦ç´ ã®ä¸Šã§ãƒ›ã‚¤ãƒ¼ãƒ«ãŒå›žã•ã‚ŒãŸã“ã¨ã‚’検知ã—(ステップ1)ã€å†…容をホイールã®å›žè»¢ã«åˆã‚ã›ã¦ã‚¹ã‚¯ãƒãƒ¼ãƒ«ã™ã‚‹ï¼ˆã‚¹ãƒ†ãƒƒãƒ—2)ã€ã¨ã„ã†äºŒã¤ã®å‡¦ç†ã‚’è¡Œã†å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚
Mozillaã§ã¯ã€ãƒ›ã‚¤ãƒ¼ãƒ«ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãŒè¡Œã‚れるã¨ã€ãã®è¦ç´ ã«ã¤ã„ã¦DOMMouseScrollã¨ã„ã†åå‰ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã—ã¾ã™ã€‚ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã®event.detail
ã®å€¤ã‚’見るã¨å›žè»¢ã®æ–¹å‘を知るã“ã¨ãŒã§ãã€æ£ã®å€¤ã§ã‚ã‚Œã°æ‰‹å‰ï¼ˆä¸‹ï¼‰ã€è² ã®å€¤ã§ã‚ã‚Œã°å‘ã“ã†ï¼ˆä¸Šï¼‰ã¸ã®å›žè»¢ã¨åˆ¤åˆ¥ã§ãã¾ã™ã€‚
ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€clickã‚„keypressãªã©ã®é€šå¸¸ã®ã‚¤ãƒ™ãƒ³ãƒˆã¨é•ã£ã¦ã€ŒonDOMMouseScrollã€ã‚¤ãƒ™ãƒ³ãƒˆãƒãƒ³ãƒ‰ãƒ©ã§ã¯æ•æ‰ã§ãã¾ã›ã‚“ãŒã€ã‚¤ãƒ™ãƒ³ãƒˆãƒªã‚¹ãƒŠãƒ¼ã‚„ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã§ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒãƒ³ãƒ‰ãƒ©å®šç¾©ã‚’使ã†ã¨æ•æ‰ã§ãã¾ã™ã€‚
JavaScriptçš„ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚„ã‚Šã¾ã™ã€‚
function onscroll(aEvent) {
aEvent.target.scrollContent(aEvent.detail > 0 ? 50 : -50 );
}
var box = document.getElementById('scrollbox');
box.addEventListener('DOMMouseScroll', onscroll, false);
ã•ã‚‰ã£ã¨aEvent.target.scrollContent()
ã¨æ›¸ã„ã¦ã—ã¾ã„ã¾ã—ãŸãŒã€ã“ã‚“ãªãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚‚ã¡ã‚ã‚“ã‚ã‚Šã¾ã›ã‚“。後ã§è‡ªåŠ›ã§å®Ÿè£…ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚
次ã¯ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã§å®Ÿè£…ã™ã‚‹å ´åˆã®ä¾‹ã§ã™ã€‚
.scrollable {
overflow: auto;
/*
縦スクãƒãƒ¼ãƒ«ã®ã¿ã®æ™‚㯠overflow: -moz-scrollbars-vertical;
横スクãƒãƒ¼ãƒ«ã®ã¿ã®æ™‚㯠overflow: -moz-scrollbars-horizontal;
*/
-moz-binding: url('scrollableElement.xml#scrollableElement');
}
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="scrollableElement">
<handlers>
<handler event="DOMMouseScroll"><![CDATA[
this.scrollContent(event.detail > 0 ? 50 : -50 );
]]></handler>
</handlers>
<implementation>
<method name="scrollContent">
<parameter name="aCount"/>
<body><![CDATA[
// メソッドã®å†…容
]]></body>
</method>
</implementation>
</binding>
</bindings>
ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’使ã†å ´åˆãªã‚‰ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å®šç¾©ã‚‚一緒ã«æ›¸ã‘ã¦ã—ã¾ã†ã®ã§ã‚ã‹ã‚Šã‚„ã™ãã¦ã„ã„ã§ã™ã。ã—ã‹ã‚‚ã€æ™®é€šã«JavaScriptã§ã‚„ã‚‹å ´åˆã¨é•ã£ã¦ã€èªã¿è¾¼ã‚“ã 時点ã§å‹æ‰‹ã«åˆæœŸåŒ–ã—ã¦ãã‚Œã¾ã™ï¼ˆè¦ç´ ã®æŒ¿å…¥ã®åº¦ã«åˆæœŸåŒ–ã™ã‚‹å¿…è¦ãŒãªã„)。
後ã¯ã‚¤ãƒ™ãƒ³ãƒˆãŒèµ·ã“ã£ãŸæ™‚ã«å†…容をスクãƒãƒ¼ãƒ«ã™ã‚Œã°æ¸ˆã‚€ã ã‘ã®è©±ãªã®ã§ã™ãŒã€ä¸€ã¤å•é¡ŒãŒã‚ã‚Šã¾ã™ã€‚実ã¯ã€æ£æ”»æ³•ã§ã¯è¦ç´ ã®å†…容をスクãƒãƒ¼ãƒ«ã§ããªã„ã®ã§ã™ã€‚
スクãƒãƒ¼ãƒ«ã•ã›ã‚‹ãŸã‚ã«ä½œã‚‰ã‚Œã¦ã„ã‚‹<scrollbox/>ãªã©ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã§ã¯å†…容をスクãƒãƒ¼ãƒ«ã™ã‚‹ãŸã‚ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå®šç¾©ã•ã‚Œã¦ã„ã¾ã™ãŒã€ãã®ä»–ã®æ™®é€šã®XULè¦ç´ ã«ã¯ãã‚“ãªãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚ã‚Šã¾ã›ã‚“。ã¾ãŸã€<scrollbox/>ã«ãŠã„ã¦ãれらã®æ©Ÿèƒ½ã‚’実ç¾ã—ã¦ã„ã‚‹nsIScrollBoxObjectã®æ©Ÿèƒ½ã‚’呼ã³å‡ºãã†ã«ã‚‚ã€<scrollbox/>以外ã®XULè¦ç´ ã®ãƒœãƒƒã‚¯ã‚¹ã‚ªãƒ–ジェクト(boxObjectプãƒãƒ‘ティ)ã‹ã‚‰ã¯nsIScrollBoxObjectã«ã¯ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“。
ã“ã“ã§ã¯ç™ºæƒ³ã‚’逆転ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚内容をスクãƒãƒ¼ãƒ«ã—ãŸçµæžœã¨ã—ã¦ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ãŒå‹•ãã®ã§ã¯ãªãã€ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã‚’å‹•ã‹ã—ãŸçµæžœã¨ã—ã¦å†…容ãŒã‚¹ã‚¯ãƒãƒ¼ãƒ«ã™ã‚‹ã€ã¨ã€‚ã¤ã¾ã‚Šã€ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã‚Œã°ã€å†…容をスクãƒãƒ¼ãƒ«ã•ã›ã‚‰ã‚Œã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚
æ–°ã—ã„テーマをインストールã™ã‚‹ã¨ã€ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã®è¡¨ç¤ºã‚‚テーマã«åˆã‚ã›ã¦å¤‰ã‚ã‚Šã¾ã™ã€‚ã“ã‚Œã¯XULã®<scrollbar/>è¦ç´ ã¨ã—ã¦è¨˜è¿°ã—ãŸã‚‚ã®ã ã‘ã§ãªãã€CSSã®overflowã®åŠ¹æžœã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã‚‹ã‚‚ã®ã«ã¤ã„ã¦ã‚‚åŒæ§˜ã§ã™ã€‚ã¨ã„ã†ã“ã¨ã¯ã€ã¤ã¾ã‚Šã€CSSã®overflowã®åŠ¹æžœã¨ã—ã¦è¡¨ç¤ºã•ã‚Œã¦ã„ã‚‹ã®ã¯XULã®<scrollbar/>è¦ç´ ã§ã‚ã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚
スクãƒãƒ¼ãƒ«å¯èƒ½ã«ãªã£ã¦ã„ã‚‹è¦ç´ ã®ä¸ã«ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ãŒè¡¨ç¤ºã•ã‚Œã¦ã„ã‚‹ã€ã¨ã„ã†ã“ã¨ã¯ã€ã‚¹ã‚¯ãƒãƒ¼ãƒ«å¯èƒ½ãªè¦ç´ ã¯ã€ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã§ã„ã†ç„¡å内容ã«ä¾‹ãˆã‚Œã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªæ§‹é€ ã«å†…部的ã«å¤‰æ›ã•ã‚Œã¦ã„ã‚‹ã‚‚ã®ã¨æŽ¨æ¸¬ã§ãã¾ã™ã€‚
<element>
<xul:vbox>
<xul:hbox>
<xul:scrollbox>
<children/><!-- elementã®å†…容 -->
</xul:scrollbox>
<xul:scrollbar orient="vertical"/><!-- 縦スクãƒãƒ¼ãƒ«ãƒãƒ¼ -->
</xul:hbox>
<xul:scrollbar orient="horizontal"/><!-- 横スクãƒãƒ¼ãƒ«ãƒãƒ¼ -->
</xul:vbox>
</element>
ã¨ã“ã‚ãŒã€ã‚¹ã‚¯ãƒãƒ¼ãƒ«å¯èƒ½ãªè¦ç´ ã®ç„¡å内容をdocument.getAnonymousNode()
ã§å–å¾—ã—よã†ã¨ã—ã¦ã‚‚ã€ã“ã®ã‚ˆã†ãªæ§‹é€ ã¯å¾—られã¾ã›ã‚“。もã¡ã‚ã‚“childNodes
プãƒãƒ‘ティã®ãƒªã‚¹ãƒˆã«ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。ã©ã†ã‚„らã€ã“ã®æ–¹æ³•ã§ã¯ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„特別ãªç„¡å内容ã¨ã—ã¦å®Ÿè£…ã•ã‚Œã¦ã„るよã†ã§ã™ã€‚
onclickãªã©ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’æ•æ‰ã—ã¦èª¿ã¹ã¦ã¿ã‚‹ã¨ã€ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã‚’æ“作ã—ãŸæ™‚ã«ã¯ã€ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã®å®Ÿä½“ã§ã‚ã‚‹<scrollbar/>è¦ç´ ã«event.originalTarget
ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã“ã¨ãŒåˆ†ã‹ã‚Šã¾ã™ã€‚æ›´ã«èª¿ã¹ã¦ã¿ã‚‹ã¨ã€ã“ã®æ™‚ã€ã“ã®ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã¯parentNode
プãƒãƒ‘ティã«ã€Œã‚¹ã‚¯ãƒãƒ¼ãƒ«å¯èƒ½ãªè¦ç´ ã€ãŒè¨å®šã•ã‚Œã¦ã„ã¾ã—ãŸã€‚親è¦ç´ ã‹ã‚‰ã¯å‹˜å½“ã•ã‚ŒãŸã‘ã‚Œã©ã‚‚ã€æœ¬äººã¯ã¾ã åè¦ç´ ã®ã¤ã‚‚ã‚Šã§ã„ã‚‹è¦ç´ ã¨ã§ã‚‚ã„ã„ã¾ã—ょã†ã‹ã€‚
スクリプト以外ã®æ–¹æ³•ã§ã“ã®ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ–¹æ³•ã¨ã—ã¦ã¯ã€CSSã¨ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã®çµ„ã¿åˆã‚ã›ãŒä½¿ãˆã¾ã™ã€‚
.scrollable > scrollbar {
-moz-binding: url('scrollableElement.xml#scrollbar');
}
CSSã®åセレクタを使ã†ã¨ã€å•ç”無用ã§ã“れらã®ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã«ã‚¹ã‚¿ã‚¤ãƒ«æŒ‡å®šãŒã§ãã¾ã™ã€‚ã“ã“ã§ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’指定ã—ã€ãã®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°å†…ã§ã‚¹ã‚¯ãƒªãƒ—トを使ãˆã°ã€æ™®é€šã¯ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„ã¯ãšã®ã“れらã®ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã«ã€ã‚¹ã‚¯ãƒªãƒ—トã§å‡¦ç†ã‚’è¡Œãˆã‚‹ã‚ã‘ã§ã™ã€‚
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="scrollbar"
extends="chrome://global/content/bindings/scrollbar.xml#scrollbar">
<!-- ↑元ã®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã‚’èªã¿è¾¼ã‚€å¿…è¦ãŒã‚ã‚‹ -->
<implementation>
<constructor><![CDATA[
// スクãƒãƒ¼ãƒ«ãƒãƒ¼è‡ªèº«ã®åˆæœŸåŒ–処ç†
if (navigator.platform.indexOf('Mac') != -1)
this.initScrollbar();
// 親è¦ç´ ã®ã€Œã‚¹ã‚¯ãƒãƒ¼ãƒ«å¯èƒ½ãªè¦ç´ ã€ã«
// プãƒãƒ‘ティã¨ã—ã¦è‡ªåˆ†è‡ªèº«ã‚’登録
if (this.orient == 'horizontal')
this.parentNode.mHorizontalScrollbar = this;
else
this.parentNode.mVerticalScrollbar = this;
]]></constructor>
<destructor><![CDATA[
// éžè¡¨ç¤ºã«ãªã‚‹æ™‚ã«ã¯
// 親è¦ç´ ã‹ã‚‰è‡ªåˆ†ã¸ã®å‚照を削除
if (this.orient == 'horizontal')
this.parentNode.mHorizontalScrollbar = null;
else
this.parentNode.mVerticalScrollbar = null;
]]></destructor>
</implementation>
</binding>
</bindings>
ã“ã“ã¾ã§æ¥ã‚Œã°ã€ã‚ã¨ã¯ç°¡å˜ã§ã™ã€‚最åˆã®ãƒã‚¤ãƒ³ãƒ‡ã‚£ãƒ³ã‚°ã®ä¾‹ã§å®šç¾©ã—よã†ã¨ã—ã¦ã„ãŸã€ŒscrollContentã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å†…容を作ã£ã¦ã„ãã¾ã—ょã†ã€‚
スクãƒãƒ¼ãƒ«ãƒãƒ¼ã®ã€Œç¾åœ¨ã®ã‚¹ã‚¯ãƒãƒ¼ãƒ«ä½ç½®ã€ã¯curpos属性ã‹ã‚‰å–å¾—ã§ãã¾ã™ã€‚ã¾ãŸã€ã“ã®å±žæ€§ã«æ–°ãŸãªå€¤ã‚’è¨å®šã™ã‚Œã°ã€ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã¯ãã®ä½ç½®ã¾ã§ã‚¹ã‚¯ãƒãƒ¼ãƒ«ã—ã¦ãã‚Œã¾ã™ã€‚以下ã«ã€æ™®æ®µã¯ç¸¦ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã‚’ã€ç¸¦ã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ãŒéžè¡¨ç¤ºã®æ™‚ã¯æ¨ªã‚¹ã‚¯ãƒãƒ¼ãƒ«ãƒãƒ¼ã‚’å‹•ã‹ã™ã€ã¨ã„ã†å ´åˆã®ä¾‹ã‚’示ã—ã¾ã™ã€‚
<method name="scrollContent">
<parameter name="aCount"/>
<body><![CDATA[
var scrollbar = (this.mVerticalScrollbar) ? this.mVerticalScrollbar :
this.mHorizontalScrollbar ;
if (!scrollbar) return;
var curPos = parseInt(scrollbar.getAttribute('curpos'));
scrollbar.setAttribute('curpos', curPos + aCount);
]]></body>
</method>
ãŸã ã€ã“ã‚Œã ã¨åˆ¶é™ä»¥ä¸Šã«ã‚¹ã‚¯ãƒãƒ¼ãƒ«ã§ãã¦ã—ã¾ã„ã¾ã™ï¼ˆå¤–見上ã¯å¤‰åŒ–ã—ã¾ã›ã‚“ãŒã€å†…部的ã«ã¯å½±éŸ¿ã—ã¾ã™ï¼‰ã‹ã‚‰ã€æœ€å°å€¤ãƒ»æœ€å¤§å€¤ã®ãƒã‚§ãƒƒã‚¯ãŒå¿…è¦ã§ã™ã€‚
<method name="scrollContent">
<parameter name="aCount"/>
<body><![CDATA[
var scrollbar = (this.mVerticalScrollbar) ? this.mVerticalScrollbar :
this.mHorizontalScrollbar ;
if (!scrollbar) return;
var curPos = parseInt(scrollbar.getAttribute('curpos'));
var maxPos = parseInt(scrollbar.getAttribute('maxpos'));
var newPos = Math.max(0, Math.min(maxPos, curPos + aCount));
scrollbar.setAttribute('curpos', newPos);
]]></body>
</method>
以上ã®å†…容をã¾ã¨ã‚ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚³ãƒ¼ãƒ‰ã«ãªã‚Šã¾ã™ã€‚
.scrollable {
overflow: auto;
-moz-binding: url('scrollableElement.xml#scrollableElement');
}
.scrollable > scrollbar {
-moz-binding: url('scrollableElement.xml#scrollbar');
}
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="scrollableElement">
<handlers>
<handler event="DOMMouseScroll"><![CDATA[
this.scrollContent(event.detail > 0 ? 50 : -50 );
]]></handler>
</handlers>
<implementation>
<method name="scrollContent">
<parameter name="aCount"/>
<body><![CDATA[
var scrollbar = (this.mVerticalScrollbar) ? this.mVerticalScrollbar :
this.mHorizontalScrollbar ;
if (!scrollbar) return;
var curPos = parseInt(scrollbar.getAttribute('curpos'));
var maxPos = parseInt(scrollbar.getAttribute('maxpos'));
var newPos = Math.max(0, Math.min(maxPos, curPos + aCount));
scrollbar.setAttribute('curpos', newPos);
]]></body>
</method>
</implementation>
</binding>
<binding id="scrollbar"
extends="chrome://global/content/bindings/scrollbar.xml#scrollbar">
<implementation>
<constructor><![CDATA[
if (navigator.platform.indexOf('Mac') != -1)
this.initScrollbar();
if (this.orient == 'horizontal')
this.parentNode.mHorizontalScrollbar = this;
else
this.parentNode.mVerticalScrollbar = this;
]]></constructor>
<destructor><![CDATA[
if (this.orient == 'horizontal')
this.parentNode.mHorizontalScrollbar = null;
else
this.parentNode.mVerticalScrollbar = null;
]]></destructor>
</implementation>
</binding>
</bindings>
スクãƒãƒ¼ãƒ«é‡ã‚’変ãˆãŸã‚Šã‚¹ã‚¯ãƒãƒ¼ãƒ«æ–¹å‘ãŒä¸€æ–¹å‘ã ã‘ã«é™å®šã™ã‚‹å ´åˆãªã©ã«ã¯ã€ã¾ãŸé©å½“ã«åŠ å·¥ã—ã¦ä¸‹ã•ã„。