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

Method loadConfig

extensions/amp-analytics/0.1/config.js:61–69  ·  view source on GitHub ↗

* @return {!Promise }

()

Source from the content-addressed store, hash-verified

59 * @return {!Promise<JsonObject>}
60 */
61 loadConfig() {
62 this.win_ = this.element_.ownerDocument.defaultView;
63 this.isSandbox_ = this.element_.hasAttribute('sandbox');
64
65 return Promise.all([this.fetchRemoteConfig_(), this.fetchVendorConfig_()])
66 .then(this.processConfigs_.bind(this))
67 .then(this.checkWarningMessage_.bind(this))
68 .then(() => this.config_);
69 }
70
71 /**
72 * Constructs the URL where the given vendor config is located

Callers 3

loadConfigTaskMethod · 0.80
test-config.jsFile · 0.80
test-vendors.jsFile · 0.80

Calls 3

fetchRemoteConfig_Method · 0.95
fetchVendorConfig_Method · 0.95
thenMethod · 0.45

Tested by

no test coverage detected