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 [
        GenerateConstructor,
        GenerateToJS,
        GenerateNativeConverter,
        CustomMarkFunction,
        InlineGetOwnPropertySlot,
        InterfaceUUID=48BB95FC-2D08-4c54-BE65-7558736A4CAE,
        ImplementationUUID=FF5CBE81-F817-429c-A6C2-0CCCD2328062
    ] Document : EventTargetNode {

        // DOM Level 1 Core
        readonly attribute DocumentType doctype;
        readonly attribute 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;

#