MCPcopy
hub / github.com/ampproject/amphtml / setProperty

Method setProperty

extensions/amp-script/0.1/amp-script.js:842–852  ·  view source on GitHub ↗

* @param {!Node} node * @param {string} property * @param {string} value * @return {boolean}

(node, property, value)

Source from the content-addressed store, hash-verified

840 * @return {boolean}
841 */
842 setProperty(node, property, value) {
843 const prop = property.toLowerCase();
844
845 // worker-dom's supported properties and corresponding attribute name
846 // differences are minor, e.g. acceptCharset vs. accept-charset.
847 if (this.purifier_.validateAttributeChange(node, prop, value)) {
848 node[property] = value;
849 return true;
850 }
851 return false;
852 }
853
854 /**
855 * TODO(choumx): Make this method always return a Promise.

Callers 15

setImportantStylesFunction · 0.80
setStyleFunction · 0.80
getAmpScrollableCarouselFunction · 0.80
getAmpSlideScrollFunction · 0.80
piFunction · 0.80
iFunction · 0.80
uFunction · 0.80
d3.jsFile · 0.80
bFunction · 0.80
setImportantStyles$1Function · 0.80
constructorMethod · 0.80

Calls 1

Tested by

no test coverage detected