/
897.txt
315 lines (228 loc) · 13.2 KB
/
897.txt
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
[1] [DFN[CSSOM]] ([DFN[CSS Object Model]]) は、 [[Webブラウザー]]などで利用可能な [[CSS]]
[[スタイル・シート]]やそれに基づく[[レンダリング]]に関する [[DOM]] [[API]] です。
* 仕様書
[REFS[
- [62] [CITE@en[CSS Object Model (CSSOM)]] ([TIME[2015-11-22 17:13:36 +09:00]] 版) <https://drafts.csswg.org/cssom/>
-- [59] [CITE@en[CSS Object Model (CSSOM)]] ([TIME[2015-07-03 16:13:04 +09:00]] 版) <http://dev.w3.org/csswg/cssom/>
]REFS]
[57] [[CSSOM]] 本体の他に、 [[CSSOM View]] があります。
[58] [[CSSOM Values]] もありますが、関心が低く放置状態にあります。
* 表記
[21] 「[[CSSOM]]」は初期には「[[DOM CSS]]」などと呼ばれたり、「[[CSS OM]]」と2語に綴られたりいろいろな表記がなされました。
* API
[FIG(short list)[
- [CODE(DOMi)@en[[[CSSStyleSheet]]]]
- [CODE(DOMi)@en[[[CSSRule]]]]
- [CODE(DOMi)@en[[[CSSStyleDeclaration]]]]
- [CODE(DOMi)@en[[[CSSValue]]]]
]FIG]
* 歴史
** DHTML
[53] [[DHTML]] 時代には、 [[IE4 DOM]] において [CODE(DOMa)@en[[[style]]]]
[[IDL属性]]が実装されました。また現在の [[CSSOM]] と似て非なる [[API]]
が実装されました。
[54] 同時期に [[Netscape 4]] が [[JSSS]] を実装しましたが、これは [[Gecko]]
移行により破棄され現在の [[CSSOM]] にはつながっていません。
** DOM2 Style
[8] [[DOM Level 2 Style]] および [[DOM Level 2 CSS]] が [[W3C勧告]]になっています。
この当時は [[CSSOM]] という呼称はまだありませんでした。
[55] おおむね [[IE4 DOM]] の [[CSS]] 部分を踏襲していましたが、
ほとんどの[[メソッド名]]などが異なっていました。
;; [56] 政治的その他の理由で敢えて実装されているものと似て非なるものを標準化するという手法は
[[IETF]] や [[W3C]] でしばしば採られていますが、大抵は互換性の問題を生み業界を混乱させる結果となっています。
[[CSSOM]] の場合もその後10年以上にわたり [[IE4]] 由来の [[CSSOM]] と [[W3C]]
由来の [[CSSOM]] の実装で分裂し混乱しました。
** Early work on CSSOM at W3C CSSWG
[15]
[CITE@en[DOM 2 Style/CSS Issues List]]
<http://daniel.glazman.free.fr/csswg/DOM_2_Style_Issues.html>
[14]
[CITE@en[CSS Editing Object Model]]
<http://daniel.glazman.free.fr/csswg/csseom/csseom.html>
[12]
[CITE[CSS Editing and Selectors Object Models]] <http://daniel.glazman.free.fr/csswg/csseom/csseom-0.00-01.htm>
** 選択子 API
[13]
[CITE['''['''whatwg''']''' getElementsByClassName()]] ([CODE[2006-02-06 11:06:49 +09:00]] 版)
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-February/005771.html>([[名無しさん]] [WEAK[2006-02-06 03:57:41 +00:00]])
> Probably doesn't matter which group does it since it'd end up being me
doing the work either way... At the time where I made that comment, the
CSSWG was planning on creating a CSSOM spec to replace the DOM2 CSS spec.
That plan still vaguely exists, though it isn't a high priority for the
CSS group.
> I can certainly see myself speccing a getElementsBySelector() API as part
of Selectors 2. But either way, the spec for gEBS is simple; it returns
the same type as getElementsByTagName(), it is accessible from Document
and Element nodes and selects a subset of the descendants of that node, it
takes a single argument (a string representing a selector), its first
version doesn't support namespaces, and it raises an exception SYNTAX_ERR
if the string can't be successfully parsed by the UA.
[10]
[CITE[ACTION-87: Selectors API from Anne van Kesteren on 2006-02-25 (public-webapi@w3.org from February 2006)]] <http://lists.w3.org/Archives/Public/public-webapi/2006Feb/0108.html>
([[名無しさん]] [WEAK[2006-02-26 02:46:14 +00:00]])
> During the F2F I got an action assigned to me to draft something up for
getElementsBySelector().
[17] 以後の動きについては[[選択子API]]の項を参照。
** [CODE(DOMi)@en[CSSValue]]
[11]
[CITE[Re: [SVGMobile12] SVGT12-207: Conformance to uDOM from Ian Hickson on 2006-01-03 (www-svg@w3.org from January 2006)]] <http://lists.w3.org/Archives/Public/www-svg/2006Jan/0066.html>
([[名無しさん]] [WEAK[2006-02-16 03:07:36 +00:00]])
> There are plans for making big improvements to the CSSOM [INS[...]]
[2]
[CITE[[CSSOM] CSSValue and related interfaces (message from the CSS WG) from Bert Bos on 2003-10-30 (www-style@w3.org from October 2003)]] <http://lists.w3.org/Archives/Public/www-style/2003Oct/0347>
> One of the specifications that the CSS WG is chartered to write is a new
version of the Document Object Model for CSS, or CSSOM for short. We don't
have a Working Draft yet, but the following is is an official statement by
the CSS. It represents the current consensus in the WG:
>> The following DOM2 Style features are considered to be problematic
and are therefore classified as obsolete. Implementors are strongly
urged not to implement them. Replacements will be provided at some
future point.
>>> The UnknownRule interface (unknown rules should be dropped by
the parser and thus never reach the DOM)
>>> The getPropertyCSSValue method, CSSValue interface, all
interfaces inheriting from CSSValue, and the RGBColor, Rect, and
Counter interfaces (the CSSValue interface is thought to be too
awkward for frequent use)
[20]
[[Ian Hickson]] の提案
<http://damowmow.com/temp/csswg/dom/values>
** CSSOM Draft 2006- by W3C CSSWG
[1]
[CITE[Cascading Style Sheets Object Model (CSSOM)]] <http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.src.html>
([[名無しさん]] [WEAK[2006-12-09 08:07:12 +00:00]])
[4]
[CITE[csswg/cssom/Overview.src.html - diff - 1.24]] ([CODE[2007-02-04 18:33:01 +09:00]] 版) <http://dev.w3.org/cvsweb/csswg/cssom/Overview.src.html.diff?r1=1.23&r2=1.24&f=h>
> 8EC0 -> Gecko
> 09E8A -> Opera
ちょwwwwwww 象形かYOwwwwwwwwwwwwwwwww
** CSSOM View
[7]
[CITE[CSSOM: clientHeight, offsetHeight and scrollHeight - Anne’s Weblog]] ([CODE[2007-08-04 03:57:35 +09:00]] 版) <http://annevankesteren.nl/2007/08/cssom-mess>
[18]
[CITE@en-US[CSSOM View Module]] ([CODE[2007-12-01 07:31:03 +09:00]] 版) <http://dev.w3.org/cvsweb/~checkout~/csswg/cssom-view/Overview.html?rev=1.1&content-type=text/html;%20charset=iso-8859-1>
([[名無しさん]])
[19]
>>18 元の [[CSSOM]] Editor's Draft の Layout API の部分が独立したようです。
以後については [[CSSOM View]] の項をご覧ください。
* memo
[9]
[CITE[JavaScript tutorial - DOM Style Sheets]] <http://www.howtocreate.co.uk/tutorials/javascript/domstylesheets>
[3]
[CITE[CSS + JavaScript Tips]] ([CODE[2007-01-18 15:22:10 +09:00]] 版) <http://usrb.in/amachang/static/cssstudy/200701/>
([[名無しさん]] [WEAK[2007-01-19 15:44:18 +00:00]])
[5]
[CITE[404 Blog Not Found:javascript - CSSをいじくる]] ([CODE[2007-03-12 07:19:59 +09:00]] 版) <http://blog.livedoor.jp/dankogai/archives/50784253.html>
> JavaScriptでDOM要素のstyle属性をいじるのは簡単ですが、これがCSSともなるとobject treeが深くて大変で、Webを見回してもほとんど参考例がありません。
日本語でおkwwwwwwwww
([[名無しさん]] [WEAK[2007-03-11 22:33:05 +00:00]])
[6]
[CITE[erik’s weblog » Blog Archive » Computed vs Cascaded Style]] ([CODE[2007-07-28 11:50:01 +09:00]] 版) <http://erik.eae.net/archives/2007/07/27/18.54.15/>
([[名無しさん]] [WEAK[2007-07-28 02:59:28 +00:00]])
[16]
[[Live CSSOM Viewer]]
[22] [CITE[CSSOM: New Beginning — Anne’s Weblog]]
([TIME[2009-11-15 14:51:56 +09:00]] 版)
<http://annevankesteren.nl/2009/10/cssom-new-beginning>
[23] [CITE[IRC logs: freenode / #whatwg / 20091015]]
([TIME[2009-12-10 00:05:28 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20091015#l-206>
[24] [CITE[IRC logs: freenode / #whatwg / 20100316]]
([TIME[2010-03-21 11:57:02 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100316>
[25] [CITE[IRC logs: freenode / #whatwg / 20100615]]
([TIME[2010-06-27 13:23:25 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100615#l-571>
[26] [CITE[IRC logs: freenode / #whatwg / 20100831]]
( ([TIME[2010-09-11 22:28:55 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20100831>
[27] [CITE[IRC logs: freenode / #whatwg / 20110113]]
( ([TIME[2011-01-20 22:41:09 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20110113>
[28] [CITE@en-US[CSSOM]]
( ([TIME[2011-07-12 02:26:01 +09:00]] 版))
<http://www.w3.org/TR/2011/WD-cssom-20110712/>
[29] [CITE@en[Extensions to the CSS Object Model - W3C Blog]]
( ([TIME[2011-07-26 16:06:08 +09:00]] 版))
<http://www.w3.org/QA/2011/07/extensions_to_the_css_object_m.html>
[30] [CITE@en-US[The CSS Object Model - Slide list]]
( ([TIME[2001-10-15 05:34:15 +09:00]] 版))
<http://www.w3.org/Talks/1999/0514-cssom-www8-plh/>
[31] [CITE[IRC logs: freenode / #whatwg / 20111221]]
( ([TIME[2011-12-22 23:59:51 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20111221#l-481>
[32] [CITE[IRC logs: freenode / #whatwg / 20120109]]
( ([TIME[2012-01-12 01:37:31 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120109#l-426>
[33] [CITE[IRC logs: freenode / #whatwg / 20120207]]
( ([TIME[2012-02-10 00:08:02 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120207#l-383>
[34] [CITE[IRC logs: freenode / #whatwg / 20120215]]
( ([TIME[2012-02-18 10:49:17 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120215#l-594>
[35] [CITE[IRC logs: freenode / #whatwg / 20120502]]
( ([TIME[2012-05-06 21:45:58 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120502>
[36] [CITE[IRC logs: freenode / #whatwg / 20120618]]
( ([TIME[2012-07-01 21:54:40 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20120618#l-1051>
[37] [CITE@en[''''''[''''''CSSOM'''''']'''''' CSSValue and related interfaces (message from the CSS WG)]]
( ([[Bert Bos]] 著, [TIME[2003-10-31 07:45:20 +09:00]] 版))
<http://lists.w3.org/Archives/Public/www-style/2003Oct/0347.html>
[38] [CITE[IRC logs: freenode / #whatwg / 20121207]]
( ([TIME[2012-12-16 15:20:55 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20121207#l-678>
[39] [CITE[IRC logs: freenode / #whatwg / 20130313]]
( ([TIME[2013-03-23 12:00:18 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20130313#l-890>
[40] [CITE[IRC logs: freenode / #whatwg / 20130419]]
( ([TIME[2013-05-01 23:09:17 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20130419#l-459>
[41] [CITE[IRC logs: freenode / #whatwg / 20130422]]
( ([TIME[2013-05-03 23:39:29 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20130422#l-419>
[42] [CITE[IRC logs: freenode / #whatwg / 20071003]]
( ([TIME[2013-05-22 12:31:36 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20071003>
[43] [CITE@en-US[cssom: Summary]]
( ([TIME[2013-05-26 02:12:32 +09:00]] 版))
<https://dvcs.w3.org/hg/cssom/>
[44] [CITE@en-US[CSS Object Model (CSSOM)]]
( ([TIME[2013-05-24 13:44:30 +09:00]] 版))
<http://dev.w3.org/csswg/cssom/>
[45] [CITE@en-US[csswg: File revisions]]
( ([TIME[2013-05-26 02:15:48 +09:00]] 版))
<https://dvcs.w3.org/hg/csswg/log/1fce354eb139/cssom/Overview.src.html>
[46] [CITE[Introduction to CSSOM (1) - DOM ECMAScripting]]
( ([TIME[2012-02-18 20:10:11 +09:00]] 版))
<http://domes.lingua.heliohost.org/dom/intro-cssom1.html>
[47] [CITE[IRC logs: freenode / #whatwg / 20130529]]
( ([TIME[2013-05-30 20:48:40 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20130529#l-188>
[48] [CITE@en-US[CSS Object Model (CSSOM)]]
( ([TIME[2013-12-05 07:19:58 +09:00]] 版))
<http://www.w3.org/TR/2013/WD-cssom-20131205/>
[49] [CITE@en[Web Applications 1.0 r8390 Update how the interaction with CSS style sheets and CSSOM is defined.]]
( ([TIME[2014-01-14 07:45:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8389&to=8390>
[50] [CITE@en-US[csswg: File revisions]]
( ([TIME[2014-01-14 23:39:11 +09:00]] 版))
<https://dvcs.w3.org/hg/csswg/log/tip/cssom/Overview.src.html>
[51] [CITE[IRC logs: freenode / #whatwg / 20140113]]
( ([TIME[2014-01-15 08:51:21 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140113#l-241>
[52] [CITE@en[CSS DOM woes]]
( ([[Bjoern Hoehrmann]] 著, [TIME[2001-09-30 12:13:31 +09:00]] 版))
<http://lists.w3.org/Archives/Public/www-style/2001Sep/0093.html>
[60] [CITE@en[''''''[''''''css-typed-om'''''']'''''' Initial commit · w3c/css-houdini-drafts@6132bef]]
([TIME[2015-10-08 11:17:58 +09:00]] 版)
<https://github.com/w3c/css-houdini-drafts/commit/6132beff7f47ac09b0f220506a54f70e6d494850>
[61] [CITE@en[Re: Typed CSSOM]]
([[Shane Stephens]] 著, [TIME[2015-10-07 10:19:44 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-houdini/2015Oct/0000.html>
[63] [CITE@en[CSS Object Model (CSSOM)]]
([TIME[2016-03-17 15:49:30 +09:00]] 版)
<https://www.w3.org/TR/2016/WD-cssom-1-20160317/>
[64] [CITE@en[''''''[''''''CSSWG'''''']''''''''''''[''''''cssom'''''']''''''''''''[''''''cssom-view'''''']'''''' Updated WD of CSSOM and CSSOM View]]
([[Simon Pieters]] 著, [TIME[2016-03-17 20:28:16 +09:00]] 版)
<https://lists.w3.org/Archives/Public/www-style/2016Mar/0248.html>