TreeWalker.currentNode

TreeWalker.currentNode 속성은 TreeWalker가 현재 가리키고 있는 Node를 나타낸다.

구문

node = treeWalker.currentNode;
treeWalker.currentNode = node;

예제

var treeWalker = document.createTreeWalker(
    document.body,
    NodeFilter.SHOW_ELEMENT,
    { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
    false
);
root = treeWalker.currentNode; // 첫번째 엘리먼트인 루트 엘리먼트!

명세

명세 상태 주석
DOM
The definition of 'TreeWalker.currrentNode' in that specification.
Living Standard Document Object Model (DOM) Level 2 Traversal and Range Specification에서 바뀌지 않음
Document Object Model (DOM) Level 2 Traversal and Range Specification
The definition of 'TreeWalker.currentNode' in that specification.
Obsolete 초기 정의.

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
currentNodeChrome Full support 1Edge Full support 12Firefox Full support 4IE Full support 9Opera Full support 9Safari Full support 3WebView Android Full support 3Chrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 3Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

같이 보기

문서 태그 및 공헌자

이 페이지의 공헌자: alattalatta, mdnwebdocs-bot, kewlbear
최종 변경자: alattalatta,