首页 » 最新资讯 » Google Amp目前已支持自定义js脚本

Google Amp目前已支持自定义js脚本

谷歌已收录,更新于2019年08月25日; 如遇到问题,请留言及时通知站长; 欢迎加入 三生三世,讨论各种问题!



今年早些时候在AMP Conf上,谷歌给我们介绍了<amp-script>的开发者预览版。现在,谷歌宣布了<amp-script>的普遍可用性。它是一个AMP组件,在单独的Worker线程中运行您自己的JavaScript。这使您可以将自定义JavaScript添加到AMP页面,同时仍保持其闪电般的速度!



  • Todo MVC使用Vue
  • 密码检查器,
  • 使用D3.js在文章中进行数据可视化,
  • 多页表单,其中每个部分都需要验证才能进入下一部分,下方是具体的效果演示。




  • 内容跳转:为了避免意外的内容跳跃,<amp-script>通常需要用户手势来更改页面内容。
  • 页面加载:由于<amp-script>在没有用户交互的情况下不会更改页面内容,因此它也不会在页面加载时修改内容。
  • 脚本大小:单个<amp-script>中使用的脚本必须小于150kB。请注意,欢迎您使用自己喜欢的JS框架,但它必须符合150K的限制。
  • API支持:并非所有API都支持Web Worker,而WorkerDOM具有允许的API列表。此外,尚未实现某些DOM方法和属性。完整列表可在WorkerDOM兼容性中公开获得。如果您要添加API,请提出问题








  1. Eric Jones Eric Jones说道:

    Hey, this is Eric and I ran across googlecho.com a few minutes ago.

    Looks great… but now what?

    By that I mean, when someone like me finds your website – either through Search or just bouncing around – what happens next? Do you get a lot of leads from your site, or at least enough to make you happy?

    Honestly, most business websites fall a bit short when it comes to generating paying customers. Studies show that 70% of a site’s visitors disappear and are gone forever after just a moment.

    Here’s an idea…

    How about making it really EASY for every visitor who shows up to get a personal phone call you as soon as they hit your site…

    You can –

    Talk With Web Visitor is a software widget that’s works on your site, ready to capture any visitor’s Name, Email address and Phone Number. It signals you the moment they let you know they’re interested – so that you can talk to that lead while they’re literally looking over your site.

    CLICK HERE http://www.talkwithwebvisitor.com to try out a Live Demo with Talk With Web Visitor now to see exactly how it works.

    You’ll be amazed - the difference between contacting someone within 5 minutes versus a half-hour or more later could increase your results 100-fold.

    It gets even better… once you’ve captured their phone number, with our new SMS Text With Lead feature, you can automatically start a text (SMS) conversation.

    That way, even if you don’t close a deal right away, you can follow up with text messages for new offers, content links, even just “how you doing?” notes to build a relationship.

    Pretty sweet – AND effective.

    CLICK HERE http://www.talkwithwebvisitor.com to discover what Talk With Web Visitor can do for your business.

    You could be converting up to 100X more leads today!

    PS: Talk With Web Visitor offers a FREE 14 days trial – and it even includes International Long Distance Calling.
    You have customers waiting to talk with you right now… don’t keep them waiting.
    CLICK HERE http://www.talkwithwebvisitor.com to try Talk With Web Visitor now.

    If you'd like to unsubscribe click here http://talkwithwebvisitor.com/unsubscribe.aspx?d=googlecho.com

赏杯咖啡给站长 支付宝 扫一扫