You can now add custom JavaScript to AMP pages

You can now add custom JavaScript to AMP pages


The new amp-script component offers more feature flexibility and interactivity.

  • More

Custom JavaScript can now be added to AMP pages, Google announced this week. The amp-script component can be used to enable user interactions, and to share code across AMP-enabled and non-AMP pages.

new amp-script component is compatible with React, Preact, Angular, Vue.js, jQuery and D3.js frameworks.
  • amp-script doesn’t change page content without user interaction, so it won’t modify your content upon page load.
  • The script within a single amp-script must be less than 150kB.
  • Not all APIs are supported inside a Web Worker; refer to WorkerDOM’s list of allowed APIs.


  • error: Content is protected !!