What's the preferred way in brython to detect whether an object is a javascript object? I'm doing this:
import javascript
isinstance (obj, javascript.JSObject)
But that litters the console with warning messages every time it's called (brython 3.8.9):
"javascript.JSObject" is deprecrated. To use a Javascript object, use window.<object name> instead.
window.JSObject doesn't exist. I searched the website, groups, and github, can't find any relevant tests for detecting js objects. The
obvious page in docs doesn't cover this.
Any suggestions? Is there a better way to test for js objects? I can get rid of the errors by assigning JSobject to a local variable name. But maybe there's a better way.
FWIW the warning doesn't seem to occur in latest brython 3.11.2. At least the
online editor doesn't generate a console warning. Maybe it was already removed / fixed.
Thanks.