標籤:clu elements mozilla directly depend represent sid not amp
綜述:
可以將其看做是依次繼承的關係:
Node
Node
A Node is an interface from which a number of DOM types inherit, and allows these various types to be treated (or tested) similarly(好幾種dom類型都繼承自node介面,這些dom類型對外會表現的很相似).
The following interfaces(下面的這些介面都繼承自Node的方法和屬性,包括Document節點、Element節點等等) all inherit from Node its methods and properties: Document, Element, CharacterData (which Text, Comment, and CDATASection inherit), ProcessingInstruction, DocumentFragment, DocumentType, Notation, Entity, EntityReference
These interfaces may return null in particular cases where the methods and properties are not relevant. They may throw an exception - for example when adding children to a node type for which no children can exist.
Document
Document
Document介面為瀏覽器中的任何網頁提供了統一的介面
The Document interface represents any web page loaded in the browser(瀏覽器中的任何網頁) and serves as an entry point into the web page‘s content, which is the DOM tree. The DOM tree includes elements such as <body> and <table>, among many others. It provides functionality global to the document, like how to obtain the page‘s URL and create new elements in the document.
The Document interface describes the common properties and methods for any kind of document(為任何一種document文檔都提供了普遍的屬性和方法). Depending on the document‘s type(根據文件類型的不同,HTML類型的提供了HTMLDocument介面,XML和SVG提供了XMLDocument介面) (e.g. HTML, XML, SVG, …), a larger API is available: HTML documents, served with the text/html content type, also implement the HTMLDocument interface, whereas XML and SVG documents implement the XMLDocumentinterface.
Element
Element
The Element interface represents an object of a Document.This interface describes methods and properties common to all kinds of elements.
Element介面表示Document中的一個對象。這個介面為所有的Element介面提供了通用的方法和屬性。
Specific behaviors are described in interfaces which inherit from Element but add additional functionality(Element中的HTMLElement,SVGElement都繼承自Element,並且有自己附加的方法和屬性). For example, the HTMLElement interface is the base interface for HTML elements, while the SVGElement interface is the basis for all SVG elements.
Languages outside the realm of the Web platform, like XUL through the XULElementinterface, also implement it.
HTMLElement
HTMLElement
The HTMLElement interface represents any HTML element. Some elements directly implement this interface, others implement it via an interface that inherits it.
EventTarge Node Docuement Element HTMLElement 關係