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

Method toggleState_

extensions/amp-subscriptions/0.1/renderer.js:86–90  ·  view source on GitHub ↗

* @param {string} type * @param {boolean} state * @private

(type, state)

Source from the content-addressed store, hash-verified

84 * @private
85 */
86 toggleState_(type, state) {
87 this.mutator_.mutateElement(this.ampdoc_.getBody(), () => {
88 this.getBodyElement_().classList.toggle(`${CSS_PREFIX}-${type}`, state);
89 });
90 }
91
92 /**
93 * @param {?boolean} state

Callers 1

toggleLoadingMethod · 0.95

Calls 4

getBodyElement_Method · 0.95
mutateElementMethod · 0.45
getBodyMethod · 0.45
toggleMethod · 0.45

Tested by

no test coverage detected