/    Sign up×
Community /Pin to ProfileBookmark

how to retrieve a list of all built-in javascript objects

I have attached a script to this post that allows you to retrieve a list of all built-in javascript objects supported by your browser. The type of the object will appear in bold. As long as the type is not listed as ‘undefined’ you can click on that object to view all the supported methods and properties. The back and forward buttons will not work with this script due to security precautions that are built into Firefox. However, I have provided links at the top of each page to help you navigate back and forward between pages. Just use those links instead of the back/forward buttons.

I had been looking for a similar type of script but I could never seem to find one. So I finally ended up writing this one. I just recently finished it and thought it might be helpful to some of you. If you’re interested in using it I have provided some instructions below. Cheers.

[b]Usage:[/b]
Download the attachment to this post and extract the getObjects.js file. Then add the following code to your webpage.

[code]
<script type=”text/javascript” src=”getObjects.js”></script>

//call the function by using the following link
<a href=”javascript:getObjects(‘window’);”>Show Objects</a>

//you can substitute the window object with any object of your choice
<a href=”javascript:getObjects(‘window.Components.interfaces’);”>Show Objects</a>

//an example webpage
<html>
<head>
<script type=”text/javascript” src=”getObjects.js”></script>
</head>
<body>
<a href=”javascript:getObjects(‘window’);”>Show Objects</a>
</body>
</html>
[/code]

[upl-file uuid=0182243c-3140-45c5-8c7c-04e8a49b437c size=670B]getObjects.zip[/upl-file]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@KorAug 04.2006 — <i>
</i>&lt;a href="javascript:(function(objName){obj=eval(objName);var r=[];for(var i in obj){r[r.length]=objName+'.'+i+' = '+obj[i];if(obj==obj[i])r[r.length-1]+=' ****';if(obj[i]==null)r[r.length-1]='t'+r[r.length-1]}r.sort();alert(r.join('n')+'nn**** refers to '+objName);})(prompt('Object:','this'));void(0);"&gt;Show Objects&lt;/a&gt;
Copy linkTweet thisAlerts:
@toptomatoJul 19.2012 — this just came up on a search, fantastic. thanks
×

Success!

Help @pccode spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...