Chikwado Posted June 16, 2016 Share Posted June 16, 2016 (edited) Some one help with cue, how to view the list of the window prototype in javascript. Edited June 16, 2016 by Chikwado Link to comment Share on other sites More sharing options...
thescientist Posted June 16, 2016 Share Posted June 16, 2016 This? https://developer.mozilla.org/en-US/docs/Web/API/Window Or do you mean like in a browser? If so, you can log the window object to the console, and expand all the properties / methods that way. Link to comment Share on other sites More sharing options...
Chikwado Posted June 16, 2016 Author Share Posted June 16, 2016 (edited) Are there a way to write a command to view the list of the following object: Number(), String(), Array(). Edited June 16, 2016 by Chikwado Link to comment Share on other sites More sharing options...
kodejuice Posted June 16, 2016 Share Posted June 16, 2016 Do you mean enumerating the items in the window object, if so here is how. for(var k in window){ console.log(k '\n'); } Link to comment Share on other sites More sharing options...
Chikwado Posted June 16, 2016 Author Share Posted June 16, 2016 I am trying to do this, I do not know if I am at right place. var objs = Object.getPrototypeOf("window", prototype);I would use loop to count them and store it in local var and print out the local var. Link to comment Share on other sites More sharing options...
Ingolme Posted June 16, 2016 Share Posted June 16, 2016 I don't believe there is access to the prototype of the Window object, and I don't think there is a list of native Javascript objects. Why do you want to do this? Link to comment Share on other sites More sharing options...
Chikwado Posted June 16, 2016 Author Share Posted June 16, 2016 (edited) Can you hit this link help tell us more about what you understand in that page: http://stackoveflow.com/questions/14022582/object-getownpropertynameswindow/-doesnt-return-settimeout-in-array I like to write a command to view all the list of that powerful element existing in browser. Example XMLHttpRequest(). more help. Edited June 16, 2016 by Chikwado Link to comment Share on other sites More sharing options...
justsomeguy Posted June 16, 2016 Share Posted June 16, 2016 Stack overflow seems to be having problems right now with their load balancing. I think the question is why you're trying to do that. If you just want to look at everything in the window object, you can do that in the developer tools, click on the DOM tab and you'll see the window object there with all of its properties and methods listed. If you're trying to print everything on a page, the question is why. Link to comment Share on other sites More sharing options...
Chikwado Posted June 16, 2016 Author Share Posted June 16, 2016 I am using a small nokia device to read a tutorial which I can not view that DOM. That why I am wondering If I can write a script place in public_html, then I would type the url to execute it from the server and it would return the list of the DOM. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 16, 2016 Share Posted June 16, 2016 The DOM is a recursive data structure, and even without recursion there's a ton of information there. Your mobile device might not handle that much output well, and it wouldn't be easy to understand. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now