MCPcopy Create free account
hub / github.com/angular/angular / getTag

Method getTag

packages/platform-browser/src/browser/meta.ts:101–105  ·  view source on GitHub ↗

* Retrieves a ` ` tag element in the current HTML document. * @param attrSelector The tag attribute and value to match against, in the format * `"tag_attribute='value string'"`. * @returns The matching element, if any.

(attrSelector: string)

Source from the content-addressed store, hash-verified

99 * @returns The matching element, if any.
100 */
101 getTag(attrSelector: string): HTMLMetaElement | null {
102 if (!attrSelector) return null;
103 const meta = this._doc.querySelector<HTMLMetaElement>(buildMetaSelector(attrSelector));
104 return isMetaTag(meta) ? meta : null;
105 }
106
107 /**
108 * Retrieves a set of `<meta>` tag elements in the current HTML document.

Callers 3

updateTagMethod · 0.95
removeTagMethod · 0.95
meta_spec.tsFile · 0.80

Calls 2

buildMetaSelectorFunction · 0.85
isMetaTagFunction · 0.85

Tested by

no test coverage detected