1 This test covers the various ways of accessing DOM elements through the window object by name, id or index, directly as properties of the window object. This lookup is supposed to include embed, form, image and object by name, and all elements by id. It should give the element itself in the case of a single match, or an HTMLCollection in the case of multiple matches; except that when iframes are involved, it will give the window object for the first iframe match.
3 Our results match WinIE in all respects but one. We allow child frame names to take precedence over built-in and custom properties of the window object. This is the Mozilla behavior and is required to make some sites work because they use frame names that collide with built-in properties in Mozilla but not IE - specifically "toobar". See Radar 3870317.
7 Nonexistent image name: undefined
8 Image by name (unique): single IMG(name)
9 Image by name (multiple): collection(2) IMG(name) IMG(name)
10 Image by id (unique): single IMG(id)
11 Image by id (multiple): collection(2) IMG(id) IMG(id)
12 Image by id/name mixed: collection(4) IMG(id) IMG(name) IMG(name) IMG(id)
14 Nonexistent form name: undefined
15 Form by name (unique): single FORM(name)
16 Form by name (multiple): collection(2) FORM(name) FORM(name)
17 Form by id (unique): single FORM(id)
18 Form by id (multiple): collection(2) FORM(id) FORM(id)
19 Form by id/name mixed: collection(4) FORM(id) FORM(name) FORM(name) FORM(id)
21 Nonexistent object name: undefined
22 Object by name (unique): single OBJECT(name)
23 Object by name (multiple): collection(2) OBJECT(name) OBJECT(name)
24 Object by id (unique): single OBJECT(id)
25 Object by id (multiple): collection(2) OBJECT(id) OBJECT(id)
26 Object by id/name mixed: collection(4) OBJECT(id) OBJECT(name) OBJECT(name) OBJECT(id)
28 Nonexistent embed name: undefined
29 Embed by name (unique): single EMBED(name)
30 Embed by name (multiple): collection(2) EMBED(name) EMBED(name)
31 Embed by id (unique): single EMBED(id)
32 Embed by id (multiple): collection(2) EMBED(id) EMBED(id)
33 Embed by id/name mixed: collection(4) EMBED(id) EMBED(name) EMBED(name) EMBED(id)
35 Nonexistent iframe name: undefined
36 Iframe by name (unique): single WINDOW
37 Iframe by name (multiple): single WINDOW
38 Iframe by id (unique): single IFRAME(id)
39 Iframe by id (multiple): collection(2) IFRAME(id) IFRAME(id)
40 Iframe by id/name mixed: single WINDOW
42 Nonexistent span name: undefined
43 Span by name (unique): undefined
44 Span by name (multiple): undefined
45 Span by id (unique): single SPAN(id)
46 Span by id (multiple): collection(2) SPAN(id) SPAN(id)
47 Span by id/name mixed: collection(2) SPAN(id) SPAN(id)
49 Mixed by id: collection(6) IMG(id) FORM(id) EMBED(id) OBJECT(id) IFRAME(id) SPAN(id)
50 Mixed by name: single WINDOW
51 Mixed by id (no iframe): collection(5) IMG(id) FORM(id) EMBED(id) OBJECT(id) SPAN(id)
52 Mixed by name (no iframe): collection(4) IMG(name) FORM(name) EMBED(name) OBJECT(name)
54 Numeric 0: single WINDOW
55 Numeric 12: single WINDOW
58 Conflicting image name: single OTHER
59 Conflicting image name (custom property): single OTHER
60 Conflicting iframe: single OTHER
62 Input by id (unique): single INPUT(id)
63 Conflicting input id (navigator): single OTHER
64 Conflicting input id (location): single OTHER