芒果tv在miniblink无法显示的bug分析

本文探讨了在使用window.external与jQuery及rollbar库时出现的错误情况。具体表现为因缺少window.external对象而导致的script标签执行失败问题,进一步影响到页面上的图片加载等功能。

http://www.mgtv.com/pcclient/tv/里用了window.external,

也用了jquery和jquery的rollbar库。

rollbar里会调用

stackTrace:
    at (anonymous function) [4]:[10]:[]
    at (anonymous function) [567]:[24]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at K.extend.globalEval [568]:[15]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at (anonymous function) [2694]:[49]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at K.extend.each [585]:[38]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at K.fn.extend.domManip [2685]:[31]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at K.fn.extend.append [2590]:[25]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at K.fn.extend.wrapAll [2565]:[20]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at RollBar [36]:[56]:[http://js.hunantv.com/imgotv-client/plugin/jquery.rollbar.js?v20150408]
    at (anonymous function) [551]:[13]:[http://js.hunantv.com/imgotv-client/plugin/jquery.rollbar.js?v20150408]
    at K.extend.each [585]:[38]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at K.fn.K.each [447]:[22]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]
    at $.fn.rollbar [550]:[21]:[http://js.hunantv.com/imgotv-client/plugin/jquery.rollbar.js?v20150408]
    at (anonymous function) [198]:[24]:[file:///C:/Users/weo/Desktop/shansuo/index2.htm]
    at (anonymous function) [205]:[9]:[file:///C:/Users/weo/Desktop/shansuo/index2.htm]
    at c [1]:[761]:[http://honey.hunantv.com/honey-2.0/honey.hunantv.imgo.js?ver=BtGfVI+tgS]
    at (anonymous function) [1]:[2778]:[http://honey.hunantv.com/honey-2.0/honey.hunantv.imgo.js?ver=BtGfVI+tgS]
    at (anonymous function) [1]:[1383]:[http://honey.hunantv.com/honey-2.0/honey.hunantv.imgo.js?ver=BtGfVI+tgS]

    at o [1]:[1715]:[http://honey.hunantv.com/honey-2.0/honey.hunantv.imgo.js?ver=BtGfVI+tgS]

这个globalEval 会把script标签取出来执行。由于mb没有window.external对象,所以执行第一个script标签就会出错,导致第二个script标签无法eval。从而导致图片等需要第二个标签绘制的逻辑无法走到

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值