1f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/*
2f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright (C) 2009 Apple Inc. All rights reserved.
3f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright (C) 2014 Samsung Electronics. All rights reserved.
4f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
5f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Redistribution and use in source and binary forms, with or without
6f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * modification, are permitted provided that the following conditions
7f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * are met:
8f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 1. Redistributions of source code must retain the above copyright
9f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *    notice, this list of conditions and the following disclaimer.
10f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 2. Redistributions in binary form must reproduce the above copyright
11f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *    notice, this list of conditions and the following disclaimer in the
12f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *    documentation and/or other materials provided with the distribution.
13f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org *
14f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
15f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
18f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */
26f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org
27f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org// FIXME: This interface should inherit HTMLCollection.
28f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org[
29f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    Custom=LegacyCallAsFunction,
30f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    DependentLifetime,
31f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    SetWrapperReferenceFrom=ownerNode,
32f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    WillBeGarbageCollected,
33f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org] interface HTMLAllCollection {
34f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    readonly attribute unsigned long length;
35f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    [ImplementedAs=item] getter Element (unsigned long index);
36f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    [Custom] Element item([Default=Undefined] optional unsigned long index);
37f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    // FIXME: This should return an (HTMLCollection or Element) union.
38f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org    [ImplementedAs=namedGetter] getter (NodeList or Element) namedItem(DOMString name);
39f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org};
40f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org