IgniteUI / ignite-ui

Ignite UI for jQuery by Infragistics
https://bit.ly/2kuu1fT
Other
477 stars 83 forks source link

JS codes work "use strict"? #2075

Closed shingos closed 3 years ago

shingos commented 4 years ago

Description

I needs to run bundled code (infragistics.core.js, infragistics.lob.js, infragistics.excel-bundled.js, etc...) in strict mode on the browser (Chrome/Edge).

To confirm this behavior, I added "use strict" to the beginning of some code file and executed it, but I often get errors such as references to variables that do not have "var" declarations or objects that do not have properties.

Is it possible to make almost all of the bundle code work "use strict"?

http://cdn-na.infragistics.com/igniteui/2020.1/latest/js/infragistics.core.js http://cdn-na.infragistics.com/igniteui/2020.1/latest/js/infragistics.lob.js

None of the above files declare "use strict" at the beginning of the file. So no error occurs. The problem is when I try to read these files as "use strict". That is, whether or not this occurs when "use strict" is added to the beginning of the file.

Expected result

I hope to read in strict mode without causing an error that the bundled JS files, such as infragistics.core.js and infragistics.lob.js. This means that adding a "use strict" declaration to the beginning of a bundle JS file such as infragistics.core.js or infragistics.lob.js will not cause an error in the browser.