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

Function onlyErrorIsDevMode

validator/js/chromeextension/worker.js:93–96  ·  view source on GitHub ↗

* Inspects ValidationResult to discover if the document has only one * error which states DEV_MODE_ONLY. See #24176 for more context. * * @param {!Object<!ValidationResult>} validationResult * @return {boolean}

(validationResult)

Source from the content-addressed store, hash-verified

91 * @return {boolean}
92 */
93function onlyErrorIsDevMode(validationResult) {
94 return ((validationResult.errors.length == 1) &&
95 (validationResult.errors[0].code == 'DEV_MODE_ONLY'));
96}
97
98/**
99 * Handles actions to be taken for pages that are on an AMP Cache.

Callers 1

validateUrlFromTabFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected