;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.MyClass = factory();
}
}(this, function() {
'use strict';
if (/*@cc_on!@*/false && document.documentMode === 10) return;
class MyClass {
// ...
}
}));
Classes obviously don't work in IE10. However, the conditional I'm using - (/*@cc_on!@*/false && document.documentMode === 10) - is there to disable it for IE10 (it works in every other case on the site). I've tried moving the conditional around to other places, wrapping the entire file in this conditional, etc, but with the same result.
Why does it still throw this error? And how can I get around it, so that this entire thing is ignored by IE10?