Simple javascript using amp-script not working
-
Hello, I’m trying to get the simple example on this page under the Virtual DOM heading:
https://amp.dev/documentation/components/amp-script
to work on my wordpress site with the AMP plugin. For some reason it’s not working in wordpress but runs fine on non wordpress pages.
In the head area of the source code I see a few references to amp-script below:
amp-script[nodom]
amp-script[sandboxed]<script src=”https://cdn.ampproject.org/v0/amp-script-0.1.mjs” async=”” custom-element=”amp-script” type=”module” crossorigin=”anonymous”></script>
<script async nomodule src=”https://cdn.ampproject.org/v0/amp-script-0.1.js” crossorigin=”anonymous” custom-element=”amp-script”></script>`It looks like it’s adding the required source library, not sure what the other code (in bold) means and suspect that is what is causing the issue?
- The topic ‘Simple javascript using amp-script not working’ is closed to new replies.