为什么jQuery用于获取CSS资产?

Ric*_*Wit 18 css jquery google-chrome-devtools

Chrome开发工具的屏幕截图: Chrome开发工具的屏幕截图

我想知道,正如问题所说:为什么我的CSS资产被jQuery获取?

CSS表格像往常一样包含在内; 一个<link rel="stylesheet"><head>标签.然后将jQuery和jQueryUI作为正文中的最后一件事.

当我转到相应的行(6128)时,它向我展示了函数curCSS..我真的找不到任何关于它的东西,只是它被jQueryUI使用并且它已经被删除了.

jQuery         v1.11.1
Google Chrome  v39.0.2171.65 (64-bit)
Run Code Online (Sandbox Code Playgroud)

EDIT1:

jQueryUI 使用这些资产.它们只是我内容的一些背景图像和字体.


EDIT2:

我已经评论了jQueryUI,重新加载了页面(Ctrl+ F5),现在它们仍然被加载,但现在有了3580行的东西.

**jQuery.js snippet removed for brevity**

当我注释掉jQuery时,它们也会正常加载.


EDIT3:

为了澄清我为什么只加载jQuery + UI而没有其他脚本:
我在我的基本模板中包含了jQuery + UI,并且我加载了另一个根本没有使用jQuery的页面.我去调试那个页面并注意到jQuery做了一些奇怪的事情:P

这是可能的最小标记:

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Pagetitle</title>

    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>

    <link rel="stylesheet" href="css/jquery-ui.min.css"/>
    <link rel="stylesheet" href="css/fonts.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>
    <div style="font-family: ArialNarrowBold">CONTENT</div>

    <script type="text/javascript" src="js/jquery/jquery.js"></script>
    <script type="text/javascript" src="js/jquery/jquery-ui.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

现在Chrome dev-tools看起来像这样:

Chrome devtools 2

ArialNarrowBold字体是fonts.css.正如您所看到的,除了包含jQuery和jQuery-UI之外,我在页面上没有进一步的脚本.即使我把它拿出来也jquery-ui.min.css保持不变.

即使我在一个style块中加载字体,jQuery仍然想自己加载它.

<style type="text/css">
    @font-face {
        font-family: 'ArialNarrowBold';
        src: url('fonts/ArialNarrowBold.eot');
        src: url('fonts/ArialNarrowBold.eot?#iefix') format('embedded-opentype'),
             url('fonts/ArialNarrowBold.woff') format('woff'),
             url('fonts/ArialNarrowBold.ttf') format('truetype');
        font-weight: normal;
        font-style: normal;
    }
</style>
Run Code Online (Sandbox Code Playgroud)

Thi*_*Rao 1

这绝对是 Chrome Devtools 的回归。我刚刚使用 Chrome Canary 和 Chromium 进行了双重检查,但无法在任一浏览器上复制这种情况。您绝对应该报告此问题:https ://support.google.com/chrome/answer/95315?hl=en

在提交错误报告之前,请检查您是否使用的是最新版本的 Chrome,如果不是,请查看是否有帮助。