I would like to check if an object is an instance of a specific built-in class. The problem is that my verification code may not be in the window where the object is defined, so it x instanceof Stringwill return false, although it xis String. What do I need, is it something like x instanceof getWindowOf(x)['String']? But is it possible to define such a function as getWindowOf?
Or we could solve it differently if we could get all the windows of the JS application. top, and the recursive loop is top.framesapproaching through , but pop-ups will not appear to us.
So what is the solution?
Please note that I just use Stringas an example. I really want to check out classes like Elementor any other classes defined in the browser.
namin source
share