Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator should flag missing script tags #875

Closed
cantrell opened this issue Nov 7, 2015 · 5 comments
Closed

Validator should flag missing script tags #875

cantrell opened this issue Nov 7, 2015 · 5 comments
Assignees

Comments

@cantrell
Copy link

cantrell commented Nov 7, 2015

I've run into a couple of cases where I've used AMP HTML tags without their corresponding script "imports," but the validator doesn't catch it. For example, in you insert an animated GIF using amp-anim (without the corresponding amp-amin JavaScript tag), the placeholder will be rendered (presumably since the amp-img implementation is in AMP core), but the validator doesn't flag the missing JavaScript tag.

@cramforce
Copy link
Member

Yes! We were tracking this already, but I can't find the issue.

@eddhannay
Copy link

@cramforce Is there any estimate for when the validator will be open sourced?

@cramforce
Copy link
Member

No, but before Christmas :) Maybe in a few days.
On Nov 9, 2015 6:41 AM, "Edd Hannay" notifications@github.com wrote:

@cramforce https://github.com/cramforce Is there any estimate for when
the validator will be open sourced?


Reply to this email directly or view it on GitHub
#875 (comment).

@Gregable
Copy link
Member

Follow up question on this issue. Is there a good reason to flag the opposite relationship: a <script> import without a corresponding tag that requires it?

This represents a small performance hit, but is otherwise not a big deal? I would imagine requiring it would break some pages where the site owner includes the superset of all imports needed by any page on the site into a reused template, so my initial thought is that this would be a bad idea to make bidirectional.

msukmanowsky pushed a commit to Parsely/amphtml that referenced this issue Jan 21, 2016
Require a specific version of each custom element.
Implement dispatch keys to associate error messages with the correct tagspec.
Require script import for each custom element.

Github Issue ampproject#875
@Gregable
Copy link
Member

The validator now flags these missing script tags. Let me know if you see any issues with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants