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。

    或者取消这个判断。 

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

  • 相关阅读:
    SpringBoot自定义错误页面,SpringBoot 404、500错误提示页面
    SpringBoot切换Tomcat容器,SpringBoot使用Jetty容器
    SpringBoot 国际化配置,SpringBoot Locale 国际化
    SpringBoot Logback配置,SpringBoot日志配置
    SpringBoot thymeleaf使用方法,thymeleaf模板迭代
    SpringBoot thymeleaf模板页面没提示,SpringBoot thymeleaf模板插件安装
    JSP判断闰年
    JSP求和计算
    JSP指令
    jsp新建项目
  • 原文地址:https://www.cnblogs.com/shiddong/p/5660067.html
Copyright © 2011-2022 走看看