Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object doesn't support property or method 'assign' when formatting html on IE11 #1367

Closed
Zlatkovsky opened this issue Mar 14, 2019 · 2 comments · Fixed by microsoft/monaco-html#8
Assignees

Comments

@Zlatkovsky
Copy link
Member

Zlatkovsky commented Mar 14, 2019

monaco-editor version: 0.16.0 / 0.16.1
Browser: Internet Explorer 11
OS: Windows

In Internet Explorer, right-clicking and selecting "Format Document" when the language is HTML causes an exception to be thrown:

Object doesn't support property or method 'assign'

TypeError: Object doesn't support property or method 'assign'
   at TemplatablePattern (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/language/html/htmlWorker.js:12230:3)
   at Tokenizer (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/language/html/htmlWorker.js:13378:3)
   at Beautifier.prototype.beautify (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/language/html/htmlWorker.js:12712:3)
   at style_html (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/language/html/htmlWorker.js:12409:3)
   at html_beautify (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/language/html/htmlWorker.js:13636:17)
   at format (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/language/html/htmlWorker.js:13749:9)
   at HTMLWorker.prototype.format (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/language/html/htmlWorker.js:15094:13)
   at BaseEditorSimpleWorker.prototype.fmr (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/base/worker/workerMain.js#html:9439:17)
   at SimpleWorkerServer.prototype._handleMessage (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/base/worker/workerMain.js#html:5982:17)
   at handleMessage (https://script-lab-react-alpha.azurewebsites.net/external/monaco-editor-0-16-1/vs/base/worker/workerMain.js#html:5968:58)

I can also repro it in the Monaco Playground in IE 11. Simply go to https://microsoft.github.io/monaco-editor/playground.html, switch to the HTML tab, press "Format Document", and you'll see the errors

image

Note that currently, the Monaco Playground uses build 0.16.0, which has another issue that was just recently fixed in 0.16.1. So the fact that the context menu does not close, and the errors related to the "remove" method, are related to that other issue (#1357) and are a red herring. But the assign one is the one that's relevant for this bug

@Zlatkovsky Zlatkovsky changed the title Object doesn't support property or method 'assign' when formatting html Object doesn't support property or method 'assign' when formatting html on IE11 Mar 14, 2019
@Zlatkovsky
Copy link
Member Author

Great! @aeschli, will you or your team be able to release an updated 0.16.2 version with the fix? Until then, I am blocked on using the latest Monaco editor. Thanks for your time!

@aeschli
Copy link
Contributor

aeschli commented Mar 19, 2019

@alexandrudima Can we make a new build?

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants