| OLD | NEW |
| 1 <body> | 1 <body> |
| 2 | 2 |
| 3 <p>This test covers the various ways of accessing DOM elements through | 3 <p>This test covers the various ways of accessing DOM elements through |
| 4 the window object by name, id or index, directly as properties of the | 4 the window object by name, id or index, directly as properties of the |
| 5 window object. This lookup is supposed to include applet, embed, form, | 5 window object. This lookup is supposed to include embed, form, |
| 6 image and object by name, and all elements by id. It should give the | 6 image and object by name, and all elements by id. It should give the |
| 7 element itself in the case of a single match, or an HTMLCollection in | 7 element itself in the case of a single match, or an HTMLCollection in |
| 8 the case of multiple matches; except that when iframes are involved, | 8 the case of multiple matches; except that when iframes are involved, |
| 9 it will give the window object for the first iframe match. | 9 it will give the window object for the first iframe match. |
| 10 </p> | 10 </p> |
| 11 | 11 |
| 12 <p>Our results match WinIE in all respects but one. We allow child | 12 <p>Our results match WinIE in all respects but one. We allow child |
| 13 frame names to take precedence over built-in and custom properties of | 13 frame names to take precedence over built-in and custom properties of |
| 14 the window object. This is the Mozilla behavior and is required to | 14 the window object. This is the Mozilla behavior and is required to |
| 15 make some sites work because they use frame names that collide with | 15 make some sites work because they use frame names that collide with |
| (...skipping 25 matching lines...) Expand all Loading... |
| 41 <form name="form2" width="0" height="0"></form> | 41 <form name="form2" width="0" height="0"></form> |
| 42 <form name="form2" width="0" height="0"></form> | 42 <form name="form2" width="0" height="0"></form> |
| 43 <form id="form3" width="0" height="0"></form> | 43 <form id="form3" width="0" height="0"></form> |
| 44 <form id="form4" width="0" height="0"></form> | 44 <form id="form4" width="0" height="0"></form> |
| 45 <form id="form4" width="0" height="0"></form> | 45 <form id="form4" width="0" height="0"></form> |
| 46 <form id="form5" width="0" height="0"></form> | 46 <form id="form5" width="0" height="0"></form> |
| 47 <form name="form5" width="0" height="0"></form> | 47 <form name="form5" width="0" height="0"></form> |
| 48 <form name="form5" width="0" height="0"></form> | 48 <form name="form5" width="0" height="0"></form> |
| 49 <form id="form5" width="0" height="0"></form> | 49 <form id="form5" width="0" height="0"></form> |
| 50 | 50 |
| 51 <applet name="applet1" width="0" height="0"></applet> | |
| 52 <applet name="applet2" width="0" height="0"></applet> | |
| 53 <applet name="applet2" width="0" height="0"></applet> | |
| 54 <applet id="applet3" width="0" height="0"></applet> | |
| 55 <applet id="applet4" width="0" height="0"></applet> | |
| 56 <applet id="applet4" width="0" height="0"></applet> | |
| 57 <applet id="applet5" width="0" height="0"></applet> | |
| 58 <applet name="applet5" width="0" height="0"></applet> | |
| 59 <applet name="applet5" width="0" height="0"></applet> | |
| 60 <applet id="applet5" width="0" height="0"></applet> | |
| 61 | |
| 62 <embed name="embed1" width="0" height="0"></embed> | 51 <embed name="embed1" width="0" height="0"></embed> |
| 63 <embed name="embed2" width="0" height="0"></embed> | 52 <embed name="embed2" width="0" height="0"></embed> |
| 64 <embed name="embed2" width="0" height="0"></embed> | 53 <embed name="embed2" width="0" height="0"></embed> |
| 65 <embed id="embed3" width="0" height="0"></embed> | 54 <embed id="embed3" width="0" height="0"></embed> |
| 66 <embed id="embed4" width="0" height="0"></embed> | 55 <embed id="embed4" width="0" height="0"></embed> |
| 67 <embed id="embed4" width="0" height="0"></embed> | 56 <embed id="embed4" width="0" height="0"></embed> |
| 68 <embed id="embed5" width="0" height="0"></embed> | 57 <embed id="embed5" width="0" height="0"></embed> |
| 69 <embed name="embed5" width="0" height="0"></embed> | 58 <embed name="embed5" width="0" height="0"></embed> |
| 70 <embed name="embed5" width="0" height="0"></embed> | 59 <embed name="embed5" width="0" height="0"></embed> |
| 71 <embed id="embed5" width="0" height="0"></embed> | 60 <embed id="embed5" width="0" height="0"></embed> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 98 <span id="span3" width="0" height="0"></span> | 87 <span id="span3" width="0" height="0"></span> |
| 99 <span id="span4" width="0" height="0"></span> | 88 <span id="span4" width="0" height="0"></span> |
| 100 <span id="span4" width="0" height="0"></span> | 89 <span id="span4" width="0" height="0"></span> |
| 101 <span id="span5" width="0" height="0"></span> | 90 <span id="span5" width="0" height="0"></span> |
| 102 <span name="span5" width="0" height="0"></span> | 91 <span name="span5" width="0" height="0"></span> |
| 103 <span name="span5" width="0" height="0"></span> | 92 <span name="span5" width="0" height="0"></span> |
| 104 <span id="span5" width="0" height="0"></span> | 93 <span id="span5" width="0" height="0"></span> |
| 105 | 94 |
| 106 <img id="mixed1" width="0" height="0"> | 95 <img id="mixed1" width="0" height="0"> |
| 107 <form id="mixed1" width="0" height="0"></form> | 96 <form id="mixed1" width="0" height="0"></form> |
| 108 <applet id="mixed1" width="0" height="0"></applet> | |
| 109 <embed id="mixed1" width="0" height="0"></embed> | 97 <embed id="mixed1" width="0" height="0"></embed> |
| 110 <object id="mixed1" width="0" height="0"></object> | 98 <object id="mixed1" width="0" height="0"></object> |
| 111 <iframe id="mixed1" width="0" height="0"></iframe> | 99 <iframe id="mixed1" width="0" height="0"></iframe> |
| 112 <span id="mixed1" width="0" height="0"></span> | 100 <span id="mixed1" width="0" height="0"></span> |
| 113 | 101 |
| 114 <img name="mixed2" width="0" height="0"> | 102 <img name="mixed2" width="0" height="0"> |
| 115 <form name="mixed2" width="0" height="0"></form> | 103 <form name="mixed2" width="0" height="0"></form> |
| 116 <applet name="mixed2" width="0" height="0"></applet> | |
| 117 <embed name="mixed2" width="0" height="0"></embed> | 104 <embed name="mixed2" width="0" height="0"></embed> |
| 118 <object name="mixed2" width="0" height="0"></object> | 105 <object name="mixed2" width="0" height="0"></object> |
| 119 <iframe name="mixed2" width="0" height="0"></iframe> | 106 <iframe name="mixed2" width="0" height="0"></iframe> |
| 120 <span name="mixed2" width="0" height="0"></span> | 107 <span name="mixed2" width="0" height="0"></span> |
| 121 | 108 |
| 122 <img id="mixed3" width="0" height="0"> | 109 <img id="mixed3" width="0" height="0"> |
| 123 <form id="mixed3" width="0" height="0"></form> | 110 <form id="mixed3" width="0" height="0"></form> |
| 124 <applet id="mixed3" width="0" height="0"></applet> | |
| 125 <embed id="mixed3" width="0" height="0"></embed> | 111 <embed id="mixed3" width="0" height="0"></embed> |
| 126 <object id="mixed3" width="0" height="0"></object> | 112 <object id="mixed3" width="0" height="0"></object> |
| 127 <span id="mixed3" width="0" height="0"></span> | 113 <span id="mixed3" width="0" height="0"></span> |
| 128 | 114 |
| 129 <img name="mixed4" width="0" height="0"> | 115 <img name="mixed4" width="0" height="0"> |
| 130 <form name="mixed4" width="0" height="0"></form> | 116 <form name="mixed4" width="0" height="0"></form> |
| 131 <applet name="mixed4" width="0" height="0"></applet> | |
| 132 <embed name="mixed4" width="0" height="0"></embed> | 117 <embed name="mixed4" width="0" height="0"></embed> |
| 133 <object name="mixed4" width="0" height="0"></object> | 118 <object name="mixed4" width="0" height="0"></object> |
| 134 <span name="mixed4" width="0" height="0"></span> | 119 <span name="mixed4" width="0" height="0"></span> |
| 135 | 120 |
| 136 <img name="navigator" with="0" height="0"> | 121 <img name="navigator" with="0" height="0"> |
| 137 <img name="custom" with="0" height="0"> | 122 <img name="custom" with="0" height="0"> |
| 138 <iframe name="location" with="0" height="0"></iframe> | 123 <iframe name="location" with="0" height="0"></iframe> |
| 139 | 124 |
| 140 <input id="navigator" value="an input" type="text"/> | 125 <input id="navigator" value="an input" type="text"/> |
| 141 <input id="location" value="an input" type="text"/> | 126 <input id="location" value="an input" type="text"/> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 print("<br>"); | 186 print("<br>"); |
| 202 | 187 |
| 203 testProperty("Nonexistent form name", "form0"); | 188 testProperty("Nonexistent form name", "form0"); |
| 204 testProperty("Form by name (unique)", "form1"); | 189 testProperty("Form by name (unique)", "form1"); |
| 205 testProperty("Form by name (multiple)", "form2"); | 190 testProperty("Form by name (multiple)", "form2"); |
| 206 testProperty("Form by id (unique)", "form3"); | 191 testProperty("Form by id (unique)", "form3"); |
| 207 testProperty("Form by id (multiple)", "form4"); | 192 testProperty("Form by id (multiple)", "form4"); |
| 208 testProperty("Form by id/name mixed", "form5"); | 193 testProperty("Form by id/name mixed", "form5"); |
| 209 print("<br>"); | 194 print("<br>"); |
| 210 | 195 |
| 211 testProperty("Nonexistent applet name", "applet0"); | |
| 212 testProperty("Applet by name (unique)", "applet1"); | |
| 213 testProperty("Applet by name (multiple)", "applet2"); | |
| 214 testProperty("Applet by id (unique)", "applet3"); | |
| 215 testProperty("Applet by id (multiple)", "applet4"); | |
| 216 testProperty("Applet by id/name mixed", "applet5"); | |
| 217 print("<br>"); | |
| 218 | |
| 219 testProperty("Nonexistent object name", "object0"); | 196 testProperty("Nonexistent object name", "object0"); |
| 220 testProperty("Object by name (unique)", "object1"); | 197 testProperty("Object by name (unique)", "object1"); |
| 221 testProperty("Object by name (multiple)", "object2"); | 198 testProperty("Object by name (multiple)", "object2"); |
| 222 testProperty("Object by id (unique)", "object3"); | 199 testProperty("Object by id (unique)", "object3"); |
| 223 testProperty("Object by id (multiple)", "object4"); | 200 testProperty("Object by id (multiple)", "object4"); |
| 224 testProperty("Object by id/name mixed", "object5"); | 201 testProperty("Object by id/name mixed", "object5"); |
| 225 print("<br>"); | 202 print("<br>"); |
| 226 | 203 |
| 227 testProperty("Nonexistent embed name", "embed0"); | 204 testProperty("Nonexistent embed name", "embed0"); |
| 228 testProperty("Embed by name (unique)", "embed1"); | 205 testProperty("Embed by name (unique)", "embed1"); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 testProperty("Conflicting image name (custom property)", "custom"); | 240 testProperty("Conflicting image name (custom property)", "custom"); |
| 264 testProperty("Conflicting iframe", "location"); | 241 testProperty("Conflicting iframe", "location"); |
| 265 print("<br>"); | 242 print("<br>"); |
| 266 | 243 |
| 267 testProperty("Input by id (unique)", "real_input"); | 244 testProperty("Input by id (unique)", "real_input"); |
| 268 testProperty("Conflicting input id (navigator)", "navigator"); | 245 testProperty("Conflicting input id (navigator)", "navigator"); |
| 269 testProperty("Conflicting input id (location)", "location"); | 246 testProperty("Conflicting input id (location)", "location"); |
| 270 | 247 |
| 271 </script> | 248 </script> |
| 272 </body> | 249 </body> |
| OLD | NEW |