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

Method constructor

extensions/amp-form/0.1/form-validators.js:69–87  ·  view source on GitHub ↗

* @param {!HTMLFormElement} form

(form)

Source from the content-addressed store, hash-verified

67 * @param {!HTMLFormElement} form
68 */
69 constructor(form) {
70 /** @protected @const {!HTMLFormElement} */
71 this.form = form;
72
73 /** @protected @const {!../../../src/service/ampdoc-impl.AmpDoc} */
74 this.ampdoc = Services.ampdoc(form);
75
76 /** @const @protected {!../../../src/service/mutator-interface.MutatorInterface} */
77 this.mutator = Services.mutatorForDoc(form);
78
79 /** @protected @const {!Document|!ShadowRoot} */
80 this.root = this.ampdoc.getRootNode();
81
82 /**
83 * Tribool indicating last known validity of form.
84 * @private {?boolean}
85 */
86 this.formValidity_ = null;
87 }
88
89 /**
90 * Called to report validation errors.

Callers

nothing calls this directly

Calls 1

getRootNodeMethod · 0.45

Tested by

no test coverage detected