【发布时间】:2019-03-11 15:46:29
【问题描述】:
我是我们设计的新手,我从 github 下载了一个包含完整源代码的网站,当我打开我的 index.html 时,它没有加载其中的 .js 文件。请帮助我,我只是打开了索引。使用 chrome 和 Firefox 的 html 文件
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<base href="/">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>SHOP</title>
<meta name="description" content="Polymer Shop Demo">
<link rel="shortcut icon" sizes="32x32" href="images/shop-icon-32.png">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@Polymer">
<meta property="og:type" content="website">
<meta property="og:site_name" content="SHOP">
<meta name="theme-color" content="#fff">
<link rel="manifest" href="manifest.json">
<style>
body {
margin: 0;
font-family: 'Roboto', 'Noto', sans-serif;
font-size: 13px;
line-height: 1.5;
min-height: 100vh;
}
/* styling for render while resources are loading */
shop-app[unresolved] {
display: block;
min-height: 101vh;
line-height: 68px;
text-align: center;
font-size: 16px;
font-weight: 600;
letter-spacing: 0.3em;
color: #202020;
padding: 0 16px;
overflow: visible;
}
</style>
</head>
<body>
<shop-app unresolved>SHOP</shop-app>
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script type="module" src="src/shop-app.js"></script>
<script>
window.performance && performance.mark && performance.mark('index.html');
</script>
</body>
</html>
【问题讨论】:
-
控制台有错误吗?您能否发布一个可重现的示例?
-
这是 git github.com/Polymer/shop.git@Edric 的克隆代码
-
控制台中是否有任何错误?
-
你的意思是代码?不,我猜
标签: javascript html google-chrome web