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

Method check

third_party/subscriptions-project/config.js:691–714  ·  view source on GitHub ↗

* @return {?PageConfig}

()

Source from the content-addressed store, hash-verified

689 * @return {?PageConfig}
690 */
691 check() {
692 // Already resolved.
693 if (!this.configResolver_) {
694 return null;
695 }
696 const config =
697 this.metaParser_.check() ||
698 this.ldParser_.check() ||
699 this.microdataParser_.check();
700 if (config) {
701 // Product ID has been found: initialize the rest of the config.
702 this.configResolver_(config);
703 this.configResolver_ = null;
704 } else if (this.doc_.isReady()) {
705 this.configResolver_(
706 Promise.reject(
707 user().createError('No config could be discovered in the page')
708 )
709 );
710 this.configResolver_ = null;
711 }
712 debugLog(config);
713 return config;
714 }
715}
716
717class TypeChecker {

Callers

nothing calls this directly

Calls 5

userFunction · 0.70
debugLogFunction · 0.70
checkMethod · 0.45
isReadyMethod · 0.45
createErrorMethod · 0.45

Tested by

no test coverage detected