1

这是我能想到的最简单的例子。在 IE7 和 IE8 中的第二次 require 调用中,我不断收到 Invalid Argument 异常。这在 IE9+、Chrome 和 Firefox 中运行良好。非常令人沮丧。通过 IE 开发人员工具对此进行调试没有帮助。

<script type="text/javascript">
   require(["dojo/request/xhr", "dojo/domReady"],
      function(xhr){
         xhr("Servlet?arg=1")
           .then(function(data) {
              try {
                   test()
               } catch(e) {
                  cpb.consoleLog(e.number);
                  cpb.consoleLog(e.description);
                  throw e;
               }
          });
      });
  function test() {
      require(['dojox/charting/Chart'], function (Chart) {
           // simulate problem
      });
  }
</script>
4

0 回答 0