TreeWalker.currentNode
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
TreeWalker.currentNode
속성은 TreeWalker
가 현재 가리키고 있는 Node
를 나타낸다.
구문
js
node = treeWalker.currentNode;
treeWalker.currentNode = node;
예제
js
var treeWalker = document.createTreeWalker(
document.body,
NodeFilter.SHOW_ELEMENT,
{
acceptNode: function (node) {
return NodeFilter.FILTER_ACCEPT;
},
},
false,
);
root = treeWalker.currentNode; // 첫번째 엘리먼트인 루트 엘리먼트!
명세
Specification |
---|
DOM # ref-for-dom-treewalker-currentnode① |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
currentNode |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.
같이 보기
TreeWalker
인터페이스