Problem/Motivation
When adding the amp/amp-selector library to the page and checking for amp errors, it can be identified that AMP does not recognize the amp-selector script defined in amp.libraries.yml.
Visible errors:
- You cannot include custom JavaScript.
- You must include the JavaScript extension 'amp-selector' for the 'amp-selector' tag.
Proposed resolution
Change the custom-template attribute defined in amp.libraries.yml for the amp-selector library to the custom-element attribute.
So the correctly loaded script would be:
<script async custom-element="amp-selector" src="https://cdn.ampproject.org/v0/amp-selector-0.1.js"></script>
and not like this:
<script async custom-template="amp-selector" src="https://cdn.ampproject.org/v0/amp-selector-0.1.js"></script>
See AMP documentation: https://amp.dev/documentation/components/amp-selector/
Comments
Comment #2
mmaldonado commentedI have made the following patch to be tested.
Comment #3
mmaldonado commented