* @param {!Node} node * @param {string} property * @param {string} value * @return {boolean}
(node, property, value)
| 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. |
no test coverage detected