AMP plugin tare da tallafi na kansa lambobin JavaScript

Accelerated Mobile Pages (AMP) don ƙirƙirar shafukan AMP na Google , plugins na AMP da janareta alamar AMPHTML suna tallafawa ɗaukar JavaScripts naka.


Talla

Spezifisches JavaScript integrieren


extension

JavaScripts na ku da abun cikin Iframe za a iya amfani da su kawai a shafukan AMP ƙarƙashin wasu yanayi.

Za'a iya shigar da lambar JavaScript naka kawai cikin AMPHflix idan an saka ta ta hanyar iframe.

Iframes in AMPHTML wiederum (via '‪‎amp-iframe‬'-Tag) akzeptieren nur Inhalte, die über eine verschlüsselte ‪‎HTTPS‬-Verbindung verfügen.

Idan kuna son yin amfani da JavaScripts naku a cikin AMPHflix, dole ne ku samar dasu ta hanyar haɗin HTTPS sannan kuma ku haɗa su cikin ƙananan rukunin gidan yanar gizon ta hanyar Iframe, don haka Mai Saurin Shafukan Wayar Hannu zai iya kuma gane JavaScripts naku kuma ya canza su. don 'amp Sauya -iframe' alamun kuma haɗa su cikin shafin AMP.

Mai samar da wutar lantarki na AMPHflix ya fahimci hadadden iframes (gami da JavaScripts), ya canza su zuwa alamun 'amp-iframe' daidai, kuma ya samar da nasu JavaScripts da ke ciki a cikin samfurin AMP.

Don amfani da JavaScript naka a cikin AMPHflix, dole ne a cika sharuɗɗan masu zuwa:

  • Dole ne JavaScript naku ya kasance mai sauƙi a ƙarƙashin HTTPS
  • Dole ne a saka JavaScript naka ta hanyar iframe

Talla