I-plugin ye-AMP esekelwa ngamakhodi wakho weJavaScript

Ijeneretha ye-Accelerated Mobile Pages (AMP) yokudala amakhasi e-Google AMP , ama- plugin e-AMP kanye nomshini wokugcwalisa womaka we- AMPHTML asekela ukwamukelwa kwe-JavaScripts yakho.


Isikhangiso

Hlanganisa iJavaScript ethile


extension

Okuqukethwe kwe-JavaScript ngokwezifiso nokuqukethwe kwe-Iframe kungasetshenziswa kuphela kumakhasi we-AMP ngaphansi kwezimo ezithile.

Ikhodi yakho yeJavaScript ingalayishwa ku-AMPHTML kuphela uma ifakwa nge-iframe.

Ama-iframes ku-AMPHTML (ngomaki we-'amp-iframe ') amukela kuphela okuqukethwe okunokuxhumeka okubethelwe kwe-HTTPS.

Uma ufuna ukusebenzisa eyakho iJavaScript ku-AMPHTML, kufanele ubanikeze ngoxhumano lwe-HTTPS bese uwahlanganisa engxenyeni engezansi yewebhusayithi nge-Iframe, ukuze i-Accelerated Mobile Pages Generator nayo ikwazi ukubona ama-JavaScript akho bese uwaguqula kumathegi we-'am amp Convert -iframe 'bese uwahlanganisa ekhasini le-AMP.

Umkhiqizi we-AMPHTML uyawabona ama-iframes ahlanganisiwe (kufaka phakathi i-JavaScript), uwaguqulela kumathegi we-'amp-iframe 'ahambisanayo, futhi enze amaJavaScript wakho aqukethwe kuwo atholakala kuhlobo lwe-AMP.

Ukuze usebenzise iJavaScript yakho ku-AMPHTML, kufanele kuhlangatshezwane nale mibandela elandelayo:

  • IJavaScript yakho kufanele ifinyeleleke ngaphansi kwe-HTTPS
  • IJavaScript yakho kufanele ishumeke nge-iframe

Isikhangiso