Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {htmlFor} from '#core/dom/static-template';

import {Services} from '#service';

import {user, userAssert} from '#utils/log';
import {userAssert} from '#utils/log';

import {urls} from '../../../src/config';
import {loadScript} from '../../../src/validator-integration';
Expand Down Expand Up @@ -67,9 +67,6 @@ const buildLogMessageTemplate = (element) => {
</div>`;
};

/** @const {string} */
const TAG = 'AMP_STORY_DEV_TOOLS_DEBUG';

export class AmpStoryDevToolsTabDebug extends AMP.BaseElement {
/** @override @nocollapse */
static prerenderAllowed() {
Expand All @@ -96,7 +93,11 @@ export class AmpStoryDevToolsTabDebug extends AMP.BaseElement {
buildCallback() {
this.storyUrl_ = this.element.getAttribute('data-story-url');
this.element.classList.add('i-amphtml-story-dev-tools-tab');
return loadScript(this.element.ownerDocument, `${urls.cdn}/v0/validator.js`)
return loadScript(
this.element.ownerDocument,
`${urls.cdn}/v0/validator_wasm.js`
)
.then(() => amp.validator.init())
.then(() =>
this.validateUrl_(/* global amp: false */ amp.validator, this.storyUrl_)
)
Expand Down Expand Up @@ -134,9 +135,6 @@ export class AmpStoryDevToolsTabDebug extends AMP.BaseElement {
error.message = validator.renderErrorMessage(error);
return error;
});
})
.catch((error) => {
user().error(TAG, error);
});
}

Expand Down