MCPcopy Create free account
hub / github.com/ampproject/amphtml / setActions

Method setActions

src/service/action-impl.js:801–806  ·  view source on GitHub ↗

* Resets a node's actions with those defined in the given actions string. * @param {!Element} node * @param {string} actionsStr

(node, actionsStr)

Source from the content-addressed store, hash-verified

799 * @param {string} actionsStr
800 */
801 setActions(node, actionsStr) {
802 node.setAttribute('on', actionsStr);
803
804 // Clear cache.
805 delete node[ACTION_MAP_];
806 }
807
808 /**
809 * Given a browser 'change' or 'input' event, add `detail` property to it

Callers 3

test-action.jsFile · 0.80
addActionFunction · 0.80

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected