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

Method constructor

src/service/localization/index.js:80–98  ·  view source on GitHub ↗

* @param {!Element} element

(element)

Source from the content-addressed store, hash-verified

78 * @param {!Element} element
79 */
80 constructor(element) {
81 this.element_ = element;
82
83 /**
84 * @private @const {?string}
85 */
86 this.viewerLanguageCode_ = Services.viewerForDoc(element).getParam('lang');
87
88 /**
89 * A mapping of language code to localized string bundle.
90 * @private @const {!{[key: string]: !LocalizedStringBundleDef}}
91 */
92 this.localizedStringBundles_ = {};
93
94 /** Fires when new language bundles are added.
95 * @private @const {!Observable<string>}
96 * */
97 this.bundleObserver_ = new Observable();
98 }
99
100 /**
101 * @param {!Element} element

Callers

nothing calls this directly

Calls 1

getParamMethod · 0.45

Tested by

no test coverage detected