Closed justinbmeyer closed 6 years ago
In unsuccessful hopes to simplify the problem, I tried using System.import
directly:
System.import("can-types/weird").then(function(){
console.log("worked")
}, function(){
console.log("borked")
})
Where weird
looks like:
console.log("weird");
throw new Error("I DON'T WORK");
This produced expected results:
LOG: weird
LOG: borked
Is there a branch where I can see this problem occurring?
it's the master branch.
The master branch of canjs? That doesn't support IE9...
Noted above:
This can be seen by cloning canjs/can-types
Ok thanks.
The problem is with the error, not with steal-clone. I think this is behaving correctly but the assertion is expecting a certain error message.
The problem seems to be that the code-frame plugin we use (the thing that pretty-prints source code) doesn't work in IE9. Going to quickly see if that can be fixed.
Well, first going to verify that the test will pass once this is bypassed.
Yeah that's the problem. Given that I can likely isolate the problem further...
Looks the specific problem with IE is that babel-code-frame depends on __proto__
and IE9 doesn't support that. So we can just check for that support.
This is fixed in https://github.com/stealjs/steal/releases/tag/v1.12.6. I just ran can-types tests and they pass in IE9.
I think, but am unsure, there is a steal-clone issue in IE9.
This can be seen by cloning
canjs/can-types
and running its tests in IE9. The test can-types: should throw if can-namespace.types is already defined will fail.The test tries to reload
can-types
withtypes
already defined and see that theimport()
is rejected:The import is NOT rejected. It is resolved and the test fails.
CURIOUSLY, the error is thrown as
clone
seems to be injecting a newnamespace
. A debugger (or console.log), will be hit here incan-types.js
The error is caught and seemingly handled right up to
doDynamicExecute
wherelinkError
is called. WithinlinkError
it even seems to be rejecting a deferred like linkSet thing.After this point, I gave up :-).