In javascript on a browser, I can do this to see if an object is DOM-related:
obj instanceof Node
How do I accomplish this with google desktop? Node is undefined, and this doesn’t work either:
obj instanceof basicElement
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not a Google Desktop expert, I just had a little time on my hands! From the documentation basicElement itself is never instantiated; it just provides a set of common properties and events for its descendant UI objects.
Therefore it looks like a JavaScript object will never be an instanceof basicElement.
However, you can always check to see if the JavaScript object implements one of basicElements more obscure method or property names – this should give you a reasonable indication that the object you are working with is a basicElement. Using something like this: