MCPcopy
hub / github.com/angular/angular / getTag

Method getTag

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

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

no outgoing calls

Tested by

no test coverage detected