Document.idl   [plain text]


/*
 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
 * Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

module core {

    interface [
        CustomToJS,
        GenerateNativeConverter,
        CustomMarkFunction,
        InlineGetOwnPropertySlot
    ] Document : Node {

        // DOM Level 1 Core
        readonly attribute DocumentType doctype;
        readonly attribute [V8Custom] DOMImplementation implementation;
        readonly attribute Element documentElement;

        [ReturnsNew] Element createElement(in [ConvertNullToNullString] DOMString tagName)
            raises (DOMException);
        DocumentFragment   createDocumentFragment();
        [ReturnsNew] Text createTextNode(in DOMString data);
        [ReturnsNew] Comment createComment(in DOMString data);
        [ReturnsNew] CDATASection createCDATASection(in DOMString data)
            raises(DOMException);
        [OldStyleObjC, ReturnsNew] ProcessingInstruction createProcessingInstruction(in DOMString target,
                                                                                     in DOMString data)
            raises (DOMException);
        [ReturnsNew] Attr createAttribute(in DOMString name)
            raises (DOMException);
        [ReturnsNew] EntityReference createEntityReference(in DOMString name)
            raises(DOMException);
        NodeList           getElementsByTagName(in DOMString tagname);

        // Introduced in DOM Level 2:

        [OldStyleObjC, ReturnsNew] Node importNode(in Node importedNode,
                                                   in boolean deep)
            raises (DOMException);
        [OldStyleObjC, ReturnsNew] Element createElementNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                                           in [ConvertNullToNullString] DOMString qualifiedName)
            raises (DOMException);
        [OldStyleObjC, ReturnsNew] Attr createAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                                          in [ConvertNullToNullString] DOMString qualifiedName)
            raises (DOMException);
        [OldStyleObjC] NodeList getElementsByTagNameNS(in [ConvertNullToNullString] DOMString namespaceURI,
                                                       in DOMString localName);
        Element            getElementById(in DOMString elementId);

        // DOM Level 3 Core

        readonly attribute [ConvertNullStringTo=Null] DOMString inputEncoding;

        readonly attribute [ConvertNullStringTo=Null] DOMString xmlEncoding;
                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString xmlVersion
                    setter raises (DOMException);
                 attribute boolean xmlStandalone
                    setter raises (DOMException);

        Node               adoptNode(in Node source)
            raises (DOMException);

                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString documentURI;

        // DOM Level 2 Events (DocumentEvents interface)

        Event              createEvent(in DOMString eventType)
            raises(DOMException);

        // DOM Level 2 Tranversal and Range (DocumentRange interface)

        Range              createRange();

        // DOM Level 2 Tranversal and Range (DocumentTraversal interface)

        [OldStyleObjC] NodeIterator createNodeIterator(in Node root,
                                                       in unsigned long whatToShow,
                                                       in NodeFilter filter,
                                                       in boolean expandEntityReferences)
            raises(DOMException);
        [OldStyleObjC] TreeWalker createTreeWalker(in Node root,
                                                   in unsigned long whatToShow,
                                                   in NodeFilter filter,
                                                   in boolean expandEntityReferences)
            raises(DOMException);

        // DOM Level 2 Abstract Views (DocumentView interface)

        readonly attribute DOMWindow defaultView;

        // DOM Level 2 Style (DocumentStyle interface)

        readonly attribute StyleSheetList styleSheets;

        // DOM Level 2 Style (DocumentCSS interface)

        [OldStyleObjC] CSSStyleDeclaration getOverrideStyle(in Element element,
                                                            in DOMString pseudoElement);
#