Cannot extend XMLHttpRequest
when target is ES5
#57945
Labels
Duplicate
An existing issue was already created
XMLHttpRequest
when target is ES5
#57945
🔎 Search Terms
Uncaught TypeError, Failed to construct, DOM object constructor cannot be called as a function
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?target=1&ssl=1&ssc=32&pln=1&pc=46#code/MYGwhgzhAECyCeANWAZAEgFwwBwEoFMBHAV3wg2nwA8N8A7AExmXSzyNPOgG8AoaaNgBOASwBuYWtDAAuaHWIBbAEb4hAbl79owAPZ1yQ4sAy6hACgCUPbQIjFsaq5tvQMACxEQAdGGgBeaABGTQEAX14I3gh8EAAzbxZMHAISMgpAhCS2VM4MFz0DCip3IQD5fAB3aGyUjnTnIA
💻 Code
🙁 Actual behavior
When transpiling to ES5, trying to run the resulting code throws the following error:
This is due to the generated code
_super.call(this)
.🙂 Expected behavior
The ES5 transpile output should behave similarly to the ES2015 transpile output. At least it shouldn't crash.
Additional information about the issue
Related to #12949
Related to #15397
The text was updated successfully, but these errors were encountered: