HTC

HTC

[5] /moz-behaviors/ <http://dean.edwards.name/moz-behaviors/>

XBL を使って HTC を無理矢理翻訳して Gecko で使用可能にしようというもの。

(名無しさん)

[6] HTC Reference <http://msdn.microsoft.com/workshop/components/htc/reference/htcref.asp> (名無しさん)

[7] HTML Components を使った DHTML Behaviors のスクリプトによる実装 <http://www.microsoft.com/japan/msdn/workshop/author/behaviors/howto/creating.asp>

[11] 2007-10-17 - d:id:quaa (2007-10-19 00:19:40 +09:00 版) <http://d.hatena.ne.jp/quaa/20071017#p1>

[12] Inside Ex DOM Storage - Yet Another Hackadelic ( 版) <http://d.hatena.ne.jp/ZIGOROu/20080924/1222224102>

カスタムイベントってイベントバブリングしないし

document.createEventObject() で作ったイベントの type プロパティの値が IE にとって未知の値 (例えば storage と言う値) だとやはり attachEvent 出来ないと言う罠。

HTC にもレンダリングモードがある

document.compatMode の値ですね。でこれが互換モードの場合だと onpropertychange イベントを扱えないので、htc の冒頭に DOCTYPE 宣言が付いてます。これ、地味だけど凄い重要。

コピペ用点プレ

<PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="foo()" />
<SCRIPT LANGUAGE="JScript">
function foo () {
	this.style.color = "red";
}
</SCRIPT>
<!--
Name:
	foo.htc --- Making text color red
License:
	Copyright 2003 Author <foo@bar.example>
	
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License
	along with this program; see the file COPYING.  If not, write to
	the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.
Last-Modified:
	$Date: 2008/07/08 03:10:12 $
-->