Does AMP HTML provide informal custom elements

Will the AMP page work with an unofficial user component?

I can imagine that getting an official one is the best for distributing the use, but only for one site that wants to program a custom component, does its component need to be approved as official, or can it just make it and include it in its own code?

https://github.com/ampproject/amphtml/blob/master/spec/amp-html-components.md

+5
source share
1 answer

No. An unofficial user component would have to violate "AMP-compliant content may not have any JavaScript." restriction.

I suggest either following the approach described in the "Service-specific JavaScript for the built-in component" section: https://github.com/ampproject/amphtml/blob/master/spec/amp-html-components.md or working with the project to include the desired component.

+6
source

Source: https://habr.com/ru/post/1235787/


All Articles