zoukankan      html  css  js  c++  java
  • can't load XRegExp twice in the same frame

     1 angular.js:9959 
     2 Error: can't load XRegExp twice in the same frame
     3     at Error (native)
     4     at eval (eval at <anonymous> (http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:4:4994), <anonymous>:12:11)
     5     at http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:4:4994
     6     at Function.x.extend.globalEval (http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:4:5005)
     7     at x.ajaxSetup.converters.text script (http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:6:15925)
     8     at On (http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:6:15583)
     9     at k (http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:6:13940)
    10     at r (http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:6:18646)
    11     at Object.send (http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:6:18771)
    12     at Function.x.extend.ajax (http://我的ip地址/vender/jquery/jquery-1.10.2.min.js:6:13722) <div ui-view="" class="ng-scope">

    不能在相同的框架中加载两次XRegExp

    一般错误的抛出是来自:Syntaxhighlighter/shCore.js

    var XRegExp;
    
    if (XRegExp) {
        // Avoid running twice, since that would break references to native globals
        throw Error("can't load XRegExp twice in the same frame");
    }

    目前,我的解决办法是在使用了angular ui-view的框架中,直接将

    <link rel="stylesheet" href="/vender/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css" type="text/css" />

    <script src="/vender/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>

    直接移到index.html首页中,这样在跳转到同一个模板的视图中加载两次Syntaxhighlighter/shCore.js。

    或者取消这个判断。 

    具体的代码和详细的过程、细节还没有弄懂,学习的过程中再慢慢理解 ^_^

  • 相关阅读:
    序列操作
    上帝造题的七分钟2 / 花神游历各国
    火柴排队
    pair(对组)用法
    线段树
    链上分治
    Rem与Px的转换
    css中单位px和em,rem的区别
    css网页自适应-1
    css网页自适应-2
  • 原文地址:https://www.cnblogs.com/shiddong/p/5660067.html
Copyright © 2011-2022 走看看