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.

getElementsByTagName

Summary

Just like Document/getElementsByTagName 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.getElementsByTagName(name);

Parameters

name

Data-type
String

The name of the element’s tag.

Return Value

Returns an object of type DOM NodeDOM Node

A DOM collection of elements with the given name.