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

Method setStateWithExpression

extensions/amp-bind/0.1/bind-impl.js:326–330  ·  view source on GitHub ↗

* Parses and evaluates an expression with a given scope and merges the * resulting object into current state. * @param {string} expression * @param {!JsonObject} scope * @return {!Promise}

(expression, scope)

Source from the content-addressed store, hash-verified

324 * @return {!Promise}
325 */
326 setStateWithExpression(expression, scope) {
327 return this.evaluateExpression_(expression, scope).then((result) =>
328 this.setStateAndUpdateHistory_(result)
329 );
330 }
331
332 /**
333 * Sanitizes a state object and merges the resulting object into the current

Callers 3

invokeMethod · 0.95
attachShadowDoc_Method · 0.80

Calls 3

evaluateExpression_Method · 0.95
thenMethod · 0.45

Tested by

no test coverage detected