命名空间大写引起的报错

如果命名空间首字母大写,发布出来的js就是这样: AnnieRoot.View=AnnieRoot.View||{}; View.View=function(){  var s = this;  annie.Sprite.call(s);  /*_a2x_need_start*//*_a2x_need_e...

attachments-2019-09-yydAyT9C5d8c683e7a76f.
如果命名空间首字母大写,发布出来的js就是这样:

AnnieRoot.View=AnnieRoot.View||{};

View.View=function(){

 var s = this;

 annie.Sprite.call(s);

 /*_a2x_need_start*//*_a2x_need_end*/

 annie.initRes(s,"View","View");

};

A2xExtend(View.View,annie.Sprite);

两个大写的View在packToOne的时候,有可能引起命名的冲突。我有一个项目就报错了:

Uncaught DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.



  • 发表于 2019-09-26 15:29
  • 阅读 ( 736 )
  • 分类:AnnieJS引擎

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
不写代码的码农
大北兔

15 篇文章

作家榜 »

  1. 王倩 20 文章
  2. 苍老师 16 文章
  3. 大北兔 15 文章
  4. facaimao 14 文章
  5. 皮卡丘先生 13 文章
  6. 季梦导师 10 文章
  7. 许导解忧 10 文章
  8. 王迎保 10 文章