OLD | NEW |
| (Empty) |
1 // Up-to-date as of 2013-04-12. | |
2 var sectionElements = { | |
3 body: { | |
4 // Obsolete | |
5 text: {type: "string", treatNullAsEmptyString: true}, | |
6 link: {type: "string", treatNullAsEmptyString: true}, | |
7 vLink: {type: "string", treatNullAsEmptyString: true}, | |
8 aLink: {type: "string", treatNullAsEmptyString: true}, | |
9 bgColor: {type: "string", treatNullAsEmptyString: true}, | |
10 background: "string", | |
11 }, | |
12 article: {}, | |
13 section: {}, | |
14 nav: {}, | |
15 aside: {}, | |
16 h1: { | |
17 // Obsolete | |
18 align: "string", | |
19 }, | |
20 h2: { | |
21 // Obsolete | |
22 align: "string", | |
23 }, | |
24 h3: { | |
25 // Obsolete | |
26 align: "string", | |
27 }, | |
28 h4: { | |
29 // Obsolete | |
30 align: "string", | |
31 }, | |
32 h5: { | |
33 // Obsolete | |
34 align: "string", | |
35 }, | |
36 h6: { | |
37 // Obsolete | |
38 align: "string", | |
39 }, | |
40 hgroup: {}, | |
41 header: {}, | |
42 footer: {}, | |
43 address: {}, | |
44 }; | |
45 | |
46 mergeElements(sectionElements); | |
47 | |
48 extraTests.push(function() { | |
49 ReflectionTests.reflects({type: "enum", keywords: ["ltr", "rtl", "auto"]}, "di
r", document, "dir", document.documentElement); | |
50 // TODO: these behave differently if the body element is a frameset. Also | |
51 // should probably test with multiple bodies. | |
52 ReflectionTests.reflects({type: "string", treatNullAsEmptyString: true}, "fgCo
lor", document, "text", document.body); | |
53 ReflectionTests.reflects({type: "string", treatNullAsEmptyString: true}, "link
Color", document, "link", document.body); | |
54 ReflectionTests.reflects({type: "string", treatNullAsEmptyString: true}, "vlin
kColor", document, "vlink", document.body); | |
55 ReflectionTests.reflects({type: "string", treatNullAsEmptyString: true}, "alin
kColor", document, "alink", document.body); | |
56 ReflectionTests.reflects({type: "string", treatNullAsEmptyString: true}, "bgCo
lor", document, "bgcolor", document.body); | |
57 // Don't mess up the colors :) | |
58 document.documentElement.removeAttribute("dir"); | |
59 var attrs = ["text", "bgcolor", "link", "alink", "vlink"]; | |
60 for (var i = 0; i < attrs.length; i++) { | |
61 document.body.removeAttribute(attrs[i]); | |
62 } | |
63 }); | |
OLD | NEW |