These are chat archives for canjs/canjs

8th
Jul 2017
seasoup
@seasoup
Jul 08 2017 02:29
when I use fixtures by using this script tag
<script src="/node_modules/steal/steal.js" main="fixtures/index"></script>
it loads an index.js page that calls import fixture from "can-fixture";
and fixtures successfully intercept ajax requests
but if I programmatically inject the script tag like this
  var scriptElem = document.createElement( "script" );
  scriptElem.src  = "/node_modules/steal/steal.js";
  // scriptElem.type = "application/javascript";
  scriptElem.main = "fixtures/index";
  document.body.appendChild( scriptElem );
the pages load but the fixtures do not work
any idea why?
seasoup
@seasoup
Jul 08 2017 02:44
later.... changing to this fixed it:
scriptElem.setAttribute('main', "fixtures/index");