MCPcopy Index your code
hub / github.com/angular/angular / writeDirectStyle

Function writeDirectStyle

packages/core/src/render3/dom_node_manipulation.ts:115–118  ·  view source on GitHub ↗

* Write `cssText` to `RElement`. * * This function does direct write without any reconciliation. Used for writing initial values, so * that static styling values do not pull in the style parser. * * @param renderer Renderer to use * @param element The element which needs to be updated. * @par

(renderer: Renderer, element: RElement, newValue: string)

Source from the content-addressed store, hash-verified

113 * @param newValue The new class list to write.
114 */
115function writeDirectStyle(renderer: Renderer, element: RElement, newValue: string) {
116 ngDevMode && assertString(newValue, "'newValue' should be a string");
117 renderer.setAttribute(element, 'style', newValue);
118}
119
120/**
121 * Write `className` to `RElement`.

Callers 1

setupStaticAttributesFunction · 0.85

Calls 2

assertStringFunction · 0.90
setAttributeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…