Lon*_*fPR 13 javascript jquery html5 google-chrome jquery-2.0
我正在构建一个HTML5页面.我正在使用JQuery,我收到以下两个控制台错误.
Denying load of chrome-extension://kkelicaakdanhinjdeammmilcgefonfh/js/jquery.min.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension. localhost/:1
GET chrome-extension://invalid/ chrome-extension://invalid/:1
Run Code Online (Sandbox Code Playgroud)
据我所知,一切都正常宣布.这是我的html页面的顶部
<!DOCTYPE HTML>
<html>
<head>
<title>Page Title</title>
<link href="css/main.css" type="text/css" rel="stylesheet" />
<link href="css/archivo-narrow.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="scripts/jquery-2.0.3.min.js"></script>
</head>
Run Code Online (Sandbox Code Playgroud)
是什么引发了这个错误?
小智 11
当你不使用CDN的jQuery(你自己下载jQuery,然后包含它),它将无法找到它的源地图,修复此错误下载jquery源地图
你可以在Developer Tool的Resource选项卡中找到源映射路径,然后打开你的jQuery文件,你会发现这样的东西
/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-2.0.3.min.map
*/
Run Code Online (Sandbox Code Playgroud)
然后转到http://code.jquery.com/sourceMappingURL,在这种情况下= http://code.jquery.com/jquery-2.0.3.min.map,然后将其保存在保存jQuery的同一目录中文件
All*_*hak 10
如果您只想温和地删除此消息,请关闭源地图.
对于Chrome用户:按Ctrl + Shift + I,单击右侧的齿轮图标以打开" 设置",取消选中" 启用源地图".
对于其他用户,请阅读开发人员工具 - 源地图
问题的细节:这是因为页面包含了缩小的JS/CSS /资源,并附加了原始文件的映射路径.不幸的是,映射路径中缺少该文件.
小智 9
如果您使用的是Chrome扩展程序Windows Resizer,可以使用它来查看http://windowresizer.userecho.com/topic/185143-exception-in-development-tools-in-chrome-dev-m-29015302-66 -and-29015353-611 /我收到同样的错误.如果我禁用扩展程序,我不再收到错误.