<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    I'm happy to live!

    Develop with pleasure!

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      39 隨筆 :: 2 文章 :: 31 評論 :: 0 Trackbacks
         chrome,firefox下面運行都很正常,唯獨在safari下會爆SyntaxError: DOM Exception 12錯誤:
     [Error] Error: SyntaxError: DOM Exception 12
    setRequestHeader@[native code]
    http://localhost:8989/app/js/base.js:40967:27
    http://localhost:8989/app/js/base.js:19014:33
    forEach@http://localhost:8989/app/js/base.js:9537:24
    http://localhost:8989/app/js/base.js:19012:14
    sendReq@http://localhost:8989/app/js/base.js:18873:21
    serverRequest@http://localhost:8989/app/js/base.js:18589:23
    processQueue@http://localhost:8989/app/js/base.js:22454:29
    http://localhost:8989/app/js/base.js:22470:39
    $eval@http://localhost:8989/app/js/base.js:23672:28
    $digest@http://localhost:8989/app/js/base.js:23488:36
    $apply@http://localhost:8989/app/js/base.js:23777:31
    bootstrapApply@http://localhost:8989/app/js/base.js:10661:21
    invoke@http://localhost:8989/app/js/base.js:13409:22
    doBootstrap@http://localhost:8989/app/js/base.js:10659:20
    bootstrap@http://localhost:8989/app/js/base.js:10679:23
    angularInit@http://localhost:8989/app/js/base.js:10573:14
    http://localhost:8989/app/js/base.js:35510:16
    fire@http://localhost:8989/app/js/base.js:3094:35
    fireWith@http://localhost:8989/app/js/base.js:3206:11
    ready@http://localhost:8989/app/js/base.js:3412:24
    completed@http://localhost:8989/app/js/base.js:3428:14
     


    這是個什么error?沒見過baidu一下有了:

    DOMException是W3C DOM核心對象。
    DOMException接口表示一個處理的錯誤,當一個操作不可能執行的時候,會拋出一個異常。
    例如試圖創建一個無效的DOM, 或通過一個不存在的節點作為參數節點操作方法。

    SYNTAX_ERR code 12 --> 無效或非法的字符串被指定。

    具休介紹可以到些鏈接查看: http://www.zhangxinxu.com/wordpress/2012/05/w3c-dom-domexception-object/

    先從error stack中找到出錯的地方,在angular-file-upload-all.js中的以下位置:
     1 var key, i;
     2 function patchXHR(fnName, newFn) {
     3     window.XMLHttpRequest.prototype[fnName] = newFn(window.XMLHttpRequest.prototype[fnName]);
     4 }
     5 
     6 if (window.XMLHttpRequest && !window.XMLHttpRequest.__isFileAPIShim) {
     7     patchXHR('setRequestHeader', function (orig) {
     8         return function (header, value) {
     9             if (header === '__setXHR_') {
    10                 var val = value(this);
    11                 // fix for angular < 1.2.0
    12                 if (val instanceof Function) {
    13                     val(this);
    14                 }
    15             } else {
    16                 orig.apply(this, arguments);
    17             }
    18         }
    19     });
    20 }

    出錯的位置在第16行,把header打出來看了一下,Authorization的值是這樣的'Token '的,后面多了一個空格,果斷刪除掉空格再試,不爆錯了,原來是空格惹的禍,為什么會出錯呢,想去看看這個orig的內容是什么,可碰到[native code],這個估計是c++的code,這個要如何看得到內容呢,問題是解決了,但還未探清問題的源頭,又是c代碼,請高人指點。 
    posted on 2015-12-17 17:04 Norsor 閱讀(1969) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲综合色自拍一区| 好男人看视频免费2019中文| 4338×亚洲全国最大色成网站| 蜜桃传媒一区二区亚洲AV| 最近的中文字幕大全免费版| 亚洲码和欧洲码一码二码三码| 成人人观看的免费毛片| 亚洲精品天堂无码中文字幕| 免费电影在线观看网站| 亚洲精品9999久久久久无码| 国产极品粉嫩泬免费观看| 国产成人高清亚洲一区91| 亚洲成a人在线看天堂无码| 一级毛片免费播放男男| 亚洲精品国产品国语在线| 国产精品区免费视频| 亚洲性色高清完整版在线观看| 99爱在线精品免费观看| 亚洲日韩国产AV无码无码精品| 午夜色a大片在线观看免费| 国产午夜亚洲精品不卡免下载| 亚洲国产精品一区二区九九| 精品一区二区三区免费观看| 亚洲AV第一页国产精品| 国产一卡2卡3卡4卡2021免费观看| 国产成人亚洲精品| 四虎成人精品在永久免费| 国产精品福利在线观看免费不卡 | 久青草视频在线观看免费| 亚洲国产精品无码久久一线| 蜜臀AV免费一区二区三区| 亚洲一线产品二线产品| 亚洲人成电影在线播放| 久久成人免费电影| 亚洲爆乳成av人在线视菜奈实| 亚洲午夜爱爱香蕉片| 久久综合国产乱子伦精品免费| 亚洲欧美综合精品成人导航| 国产亚洲av人片在线观看| 91频在线观看免费大全| 一级特黄录像免费播放中文版|