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

Method getTag

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

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