Страница AMP не загружает пользовательский скрипт JS - PullRequest
0 голосов
/ 06 января 2020

Я хочу перенести HTML5 страницу в AMP. Как загрузить CSS, внешний jQuery и существующий пользовательский файл JS на страницу Google AMP.

//Below is the Index.html file content
<amp-script layout="container" src="dist\topics\smart.js">
    <p>Initial content that can be modified from JavaScript</p>
</amp-script>

/*Below is the content of the js file*/

function hello(){
    
    this.alert("hello world");
}

/*At the time of js function calling in the index file, then Uncaught ReferenceError: hello is not defined, error is coming.*/
...