NonDocumentTypeChildNode - Web API 接口参考 编辑
NonDocumentTypeChildNode
接口包含专属于某些(特殊) Node
对象的方法,这些对象可以拥有父对象,但不适用于 DocumentType
接口。
NonDocumentTypeChildNode
是一个裸接口(raw interface),无法创建拥有此类型的对象;它是由 Element
,和 CharacterData
对象实现的。
属性
此接口没有继承属性。
NonDocumentTypeChildNode.previousElementSibling
只读- Returns the
Element
immediately prior to this node in its parent's children list, ornull
if there is noElement
in the list prior to this node. NonDocumentTypeChildNode.nextElementSibling
只读- Returns the
Element
immediately following this node in its parent's children list, ornull
if there is noElement
in the list following this node.
方法
此接口既没有继承方法,又没有专有方法。
规范
规范 | 状态 | 备注 |
---|---|---|
DOM NonDocumentTypeChildNode | Living Standard | Splitted the ElementTraversal interface in ParentNode , ChildNode , and NonDocumentTypeChildNode . The previousElementSibling and nextElementSibling are now defined on the latter.The CharacterData and Element implemented the new interfaces. |
Element Traversal Specification ElementTraversal | Obsolete | Added the initial definition of its properties to the ElementTraversal pure interface and use it on Element . |
浏览器兼容性
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.参见
- The
ParentNode
andChildNode
pure interface. - Object types implementing this pure interface:
CharacterData
, andElement
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论