MCPcopy
hub / github.com/ampproject/amphtml / recordGoogleFontExp_

Method recordGoogleFontExp_

src/service/performance-impl.js:558–572  ·  view source on GitHub ↗

@private

()

Source from the content-addressed store, hash-verified

556
557 /** @private */
558 recordGoogleFontExp_() {
559 if (!this.googleFontExpRecorded_) {
560 this.googleFontExpRecorded_ = true;
561 const {win} = this;
562 const googleFontExp = parseInt(
563 computedStyle(win, win.document.body).getPropertyValue(
564 '--google-font-exp'
565 ),
566 10
567 );
568 if (googleFontExp >= 0) {
569 this.addEnabledExperiment(`google-font-exp=${googleFontExp}`);
570 }
571 }
572 }
573
574 /**
575 * Tick the metrics whose values change over time.

Callers 2

Calls 2

addEnabledExperimentMethod · 0.95
computedStyleFunction · 0.90

Tested by

no test coverage detected