MCPcopy Create free account
hub / github.com/angular/components / _prependPathToReferences

Method _prependPathToReferences

src/material/icon/icon.ts:403–413  ·  view source on GitHub ↗

* Prepends the current path to all elements that have an attribute pointing to a `FuncIRI` * reference. This is required because WebKit browsers require references to be prefixed with * the current path, if the page has a `base` tag.

(path: string)

Source from the content-addressed store, hash-verified

401 * the current path, if the page has a `base` tag.
402 */
403 private _prependPathToReferences(path: string) {
404 const elements = this._elementsWithExternalReferences;
405
406 if (elements) {
407 elements.forEach((attrs, element) => {
408 attrs.forEach(attr => {
409 element.setAttribute(attr.name, `url('${path}#${attr.value}')`);
410 });
411 });
412 }
413 }
414
415 /**
416 * Caches the children of an SVG element that have `url()`

Callers 2

ngAfterViewCheckedMethod · 0.95
_setSvgElementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected