EventTarge Node Docuement Element HTMLElement 关系
综述:
可以将其看做是依次继承的关系:

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接口为浏览器中的任何网页提供了统一的接口
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
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
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 关系的更多相关文章
- 浅析Node与Element
起因 起因有二: 在看winter老师的分享:<一个前端的自我修养>时,有注意到这么一幅图,里面有写childNode和children属性. 昨天有学弟问起我,能否自己定义一个所有元素节 ...
- 【转载】跟随 Web 标准探究DOM -- Node 与 Element 的遍历
跟随 Web 标准探究DOM -- Node 与 Element 的遍历 这个是 Joyee 2014年更新的,可能是转战github缘故,一年多没有跟新了.这篇感觉还挺全面,就转载过来,如以前文章一 ...
- xml中Node和Element的区别
本文转载自:http://blog.csdn.net/wcydiyi/article/details/4432636点击打开链接 1.元素(Element)和结点(Node)的区别: ...
- 跟随 Web 标准探究DOM -- Node 与 Element 的遍历
写在前面 这篇没有什么 WebKit 代码的分析,因为……没啥好分析的,在实现里无非就是树的(先序DFS)遍历而已,囧哈哈哈……在WebCore/dom/Node.h , WebCore/dom/Co ...
- DOM中的node与element的区别
先看document的两个常见method. document.createTextNode Constructor: Text document.createElement Constructor: ...
- js node.children与node.childNodes与node.firstChild,node,lastChild之间的关系
博客搬迁,给你带来的不便,敬请谅解! http://www.suanliutudousi.com/2017/11/06/js-node-children%e4%b8%8enode-childnodes ...
- 使用DOM进行xml文档的crud(增删改查)操作<操作详解>
很多朋友对DOM有感冒,这里我花了一些时间写了一个小小的教程,这个能看懂,会操作了,我相信基于DOM的其它API(如JDOM,DOM4J等)一般不会有什么问题. 后附java代码,也可以下载(可点击这 ...
- [js]js中类的继承
凡事总有个开端,也有个tag节点(里程碑).阶段性的划分总结,是一种对精神的慰藉,否则精神就像野马一样,会放弃,会累死. 继承: 子类原型指向父类一个实例 类的继承-模拟系统类 Object -> ...
- JavaScript中Element与Node的区别,children与childNodes的区别
关于Element跟Node的区别,cilldren跟childNodes的区别很多朋友弄不清楚,本文试图让大家明白这几个概念之间的区别. Node(节点)是DOM层次结构中的任何类型的对象的通用名称 ...
随机推荐
- kubernetes 与LVM的结合
本文主要介绍k8s与LVM结合使用的场景,在原生的k8s中对于本地存储提供了hostPath与emptyDir两种volme,hostPath是直接将文件存储在本地主机上,存在的问题是无法进行quot ...
- 剑指offer——面试题30:包含min函数的栈
#include"iostream" #include"stdio.h" using namespace std; ; ; template<typena ...
- OpenERP button 的三种类型
1. workflow: 默认是这种类型,如果你需要创建工作流类型的button使用这个 2. object: 调用function的类型,如果你需要调用py文件中同名的方法,使用该类型. 3.act ...
- 1、 小白带你入坑xamarin系列之环境搭建和准备
重点提示 由于xamarin发展更新很快 目前教程部分内容已经过时 请注意下载最新版本 2018.05.23 www.xamarin.com 1. 小白带你入坑xamarin系列之环境搭建和准备 ...
- (转)漫谈JVM
漫谈JVM 原文:https://liuzhengyang.github.io/2016/10/05/gossip-jvm/ 背景介绍 JVM已经是Java开发的必备技能了,JVM相当于Java的操作 ...
- easyui的datagrid对应的java对象
Easyui中datagrid控件要求的数据格式为: {total:”2”,rows:[{“id”:”1”,”name”,”张三”},{“id”:”2”,”name”,”李四”}]} 所以可以建一个对 ...
- redis 实现消息发布和订阅
1,打开二个客户端机器 一个用于发布,一个用于接受 2,发布一个channel1 3,用另外一个客户端收听上面的客户端 4,当再次在发布的redis客户端 发布一个消息 其他所有订阅的客户端会自动收 ...
- struts2 servlet之间通信
Servlet之间通信的方式有两大类,每个类有三种不同的方法 1.request 2.session 3.application 不实现ServletContextAware,SessionAware ...
- [中英对照]How PCI Works | PCI工作原理
How PCI Works | PCI工作原理 Your computer's components work together through a bus. Learn about the PCI ...
- Linux系统快速查找文件
有时候下载新的文件或安装新的包 但是却搞不清默认放在哪个目录了,这个时候可以使用locate命令进行快速模糊查找 比如我使用 go get github.com/coreos/bbolt/... 在一 ...