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

Method __mutate

testing/fake-dom.js:753–762  ·  view source on GitHub ↗

* This is a non-standard method that allows you to queue a mutation. * * @param {!Object} mutation * @return {!Promise}

(mutation)

Source from the content-addressed store, hash-verified

751 * @return {!Promise}
752 */
753 __mutate(mutation) {
754 this.mutations_.push(mutation);
755 if (this.scheduled_) {
756 return this.scheduled_;
757 }
758 return (this.scheduled_ = Promise.resolve().then(() => {
759 this.scheduled_ = null;
760 this.callback_(this.takeRecords_());
761 }));
762 }
763}
764
765export class FakePerformance {

Callers 2

Calls 4

takeRecords_Method · 0.95
resolveMethod · 0.80
pushMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected