This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

getElementById

Summary

Just like Document.getElementById except that it only works within the scope of this ShadowRoot’s shadow tree.

Method of dom/shadowdom/ShadowRootdom/shadowdom/ShadowRoot

Syntax

var result = element.getElementById();

Return Value

Returns an object of type DOM NodeDOM Node

Returns the DOM node specified by the given ID. Case matters, and if there is more than one node with the given ID, which node is returned is uncertain.