Closed Magistone closed 2 years ago
Per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields#browser_compatibility, private class methods are not supported by the CEF version used in OBS. Work is underway to update CEF but it is a large undertaking.
Status on the upgrade can be followed here: https://github.com/obsproject/obs-studio/discussions/3853
Operating System Info
Windows 10
Other OS
No response
OBS Studio Version
27.1.3
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/2VzpKM_-cgb4287C
OBS Studio Crash Log URL
No response
Expected Behavior
Expected the JS engine to parse the js code successfully
Current Behavior
When the OBS browser JS engine tries to parse the source it logs an error in console at
#privateMethod()
with the errorunexpected token (
Private fields nor public methods are not affectedSteps to Reproduce
<script src="theFile.js"></script>
Uncaught SyntaxError: Unexpected token
on the line with#privateMethod()
Screenshot from OBS devtools
Anything else we should know?
The files in the provided log are custom code, currently unavailable to the public. However, I did confirm that the example given with the copy of
syntax
code triggers the bug as well.