| 1 |
wakaba |
1.2 |
|
| 2 |
|
|
[5]
|
| 3 |
|
|
[CITE[/moz-behaviors/]] <http://dean.edwards.name/moz-behaviors/>
|
| 4 |
|
|
|
| 5 |
|
|
[[XBL]] を使って [[HTC]] を無理矢理翻訳して
|
| 6 |
|
|
[[Gecko]] で使用可能にしようというもの。
|
| 7 |
|
|
|
| 8 |
|
|
([[名無しさん]])
|
| 9 |
|
|
|
| 10 |
|
|
[6]
|
| 11 |
|
|
[CITE[HTC Reference]] <http://msdn.microsoft.com/workshop/components/htc/reference/htcref.asp>
|
| 12 |
|
|
([[名無しさん]])
|
| 13 |
|
|
|
| 14 |
|
|
[7]
|
| 15 |
|
|
[CITE[HTML Components を使った DHTML Behaviors のスクリプトによる実装]] <http://www.microsoft.com/japan/msdn/workshop/author/behaviors/howto/creating.asp>
|
| 16 |
|
|
|
| 17 |
|
|
[11]
|
| 18 |
|
|
[CITE[2007-10-17 - d:id:quaa]] ([CODE[2007-10-19 00:19:40 +09:00]] 版) <http://d.hatena.ne.jp/quaa/20071017#p1>
|
| 19 |
|
|
|
| 20 |
|
|
[12] [CITE[Inside Ex DOM Storage - Yet Another Hackadelic]] ([TIME[2009-02-01 19:42:57 +09:00]] 版) <http://d.hatena.ne.jp/ZIGOROu/20080924/1222224102>
|
| 21 |
|
|
|
| 22 |
|
|
>カスタムイベントってイベントバブリングしないし
|
| 23 |
|
|
>document.createEventObject() で作ったイベントの type プロパティの値が IE にとって未知の値 (例えば storage と言う値) だとやはり attachEvent 出来ないと言う罠。
|
| 24 |
|
|
|
| 25 |
|
|
> HTC にもレンダリングモードがある
|
| 26 |
|
|
>
|
| 27 |
|
|
document.compatMode の値ですね。でこれが互換モードの場合だと onpropertychange イベントを扱えないので、htc の冒頭に DOCTYPE 宣言が付いてます。これ、地味だけど凄い重要。
|
| 28 |
|
|
|
| 29 |
|
|
* コピペ用点プレ
|
| 30 |
|
|
|
| 31 |
|
|
[PRE[
|
| 32 |
|
|
<PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="foo()" />
|
| 33 |
|
|
<SCRIPT LANGUAGE="JScript">
|
| 34 |
|
|
function foo () {
|
| 35 |
|
|
this.style.color = "red";
|
| 36 |
|
|
}
|
| 37 |
|
|
</SCRIPT>
|
| 38 |
|
|
<!--
|
| 39 |
|
|
Name:
|
| 40 |
|
|
foo.htc --- Making text color red
|
| 41 |
|
|
License:
|
| 42 |
|
|
Copyright 2003 Author <foo@bar.example>
|
| 43 |
|
|
|
| 44 |
|
|
This program is free software; you can redistribute it and/or modify
|
| 45 |
|
|
it under the terms of the GNU General Public License as published by
|
| 46 |
|
|
the Free Software Foundation; either version 2 of the License, or
|
| 47 |
|
|
(at your option) any later version.
|
| 48 |
|
|
|
| 49 |
|
|
This program is distributed in the hope that it will be useful,
|
| 50 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 51 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 52 |
|
|
GNU General Public License for more details.
|
| 53 |
|
|
|
| 54 |
|
|
You should have received a copy of the GNU General Public License
|
| 55 |
|
|
along with this program; see the file COPYING. If not, write to
|
| 56 |
|
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
| 57 |
|
|
Boston, MA 02111-1307, USA.
|
| 58 |
|
|
Last-Modified:
|
| 59 |
|
|
$Date: 2008/07/08 03:10:12 $
|
| 60 |
|
|
-->
|
| 61 |
|
|
]PRE]
|
| 62 |
|
|
|
| 63 |
|
|
- [1] 「編集」モードで見てコピペしてください。「表示」モードでは Wiki 的解釈のために崩れています。
|
| 64 |
|
|
- [2] >>1 いまの wiki の実装では表示モードで問題ないですね。
|
| 65 |
|
|
- [3] 同じ [[URI]] で、[[内容折衝]]で同じ機能の [[XBL]] とサーバーが勝手に使い分けれたら素敵です。
|
| 66 |
wakaba |
1.1 |
- [4] >>3 よく考えてみると、 WinIE は [SAMP(CSS)[[[behavior]]: url(foo.htc)]], [[Gecko]] は [SAMP(CSS)[[[-moz-binding]]: url(foo.xbl#id)]] だから、 URI だけ同じにしてもあまり嬉しくないんだな、これが。 |