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

Method getTag

packages/platform-browser/src/browser/meta.ts:99–103  ·  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

97 * @returns The matching element, if any.
98 */
99 getTag(attrSelector: string): HTMLMetaElement | null {
100 if (!attrSelector) return null;
101 const meta = this._doc.querySelector<HTMLMetaElement>(buildMetaSelector(attrSelector));
102 return isMetaTag(meta) ? meta : null;
103 }
104
105 /**
106 * 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