Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does AMP HTML allow unofficial custom elements

Will an AMP page work with an unofficial custom component?

I can imagine getting an official one is best for spreading usage but for just 1 site which wants to program in some custom component does it need to get its component approved as official or it can just make one and include it in its own code?

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

like image 527
kzap Avatar asked Nov 12 '15 13:11

kzap


1 Answers

No. An unofficial custom component would have to break the "AMP-conforming content may not have any JavaScript." constraint.

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

like image 164
ade Avatar answered Sep 25 '22 17:09

ade