473,883 Members | 1,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best JavaScript DOM Inspector (Browser)

Hi

Just wondering if anybody can recommend the best JavaScript based DOM
browser / inspector?

Like those ones:

http://www.informatrix.ch/joe/joe.html
http://javascript.internet.com/page-...m-browser.html

Thank you.

Jul 23 '05 #1
6 2221
Alex Vassiliev wrote:
Hi

Just wondering if anybody can recommend the best JavaScript based DOM
browser / inspector?

Like those ones:

http://www.informatrix.ch/joe/joe.html
http://javascript.internet.com/page-...m-browser.html


Just curious - what benefit does a JavaScript-based DOM inspector have
over one that is available for free as a browser extension?
--
Rob
Jul 23 '05 #2
RobG wrote:
Just curious - what benefit does a JavaScript-based DOM inspector have
over one that is available for free as a browser extension?


.... which might also be JavaScript based :-)
Jul 23 '05 #3
All regular benefits of web application:
(1) easy to deploy with my application
(2) multiple browsers compatibility

Plus, if source code is available, I can invoke it from my js
application when it is exactly in the state I wanted to inspect plus I
can pass the reference to the exact object I wanted to inspect.
RobG wrote:
Alex Vassiliev wrote:
Hi

Just wondering if anybody can recommend the best JavaScript based DOM
browser / inspector?

Like those ones:

http://www.informatrix.ch/joe/joe.html
http://javascript.internet.com/page-...m-browser.html


Just curious - what benefit does a JavaScript-based DOM inspector have
over one that is available for free as a browser extension?
--
Rob


Jul 23 '05 #4
Alex Vassiliev wrote:
All regular benefits of web application:
(1) easy to deploy with my application
(2) multiple browsers compatibility

Plus, if source code is available, I can invoke it from my js
application when it is exactly in the state I wanted to inspect plus I
can pass the reference to the exact object I wanted to inspect.

[...]

Here is a 'DOMwalk' script I wrote some time ago as a quick 'n dirty
tree dump. If you give domReport() an id it will walk down from there.
If no id is given, it starts from the html element. I've tested it in
most modern browsers and it seems to be fine.

Everything is listed in a table with a node reference, with a bit of
effort a better presentation is possible. Nodes could be listed as <li>
elements and each parent node could have an associated <ul> element with
an onclick that collapses the branch. Node attributes could be in a
<span> beneath each node and be shown/hidden when the node is clicked on.

I had intentions of doing at least some of the above, but it seemed
pointless given that a perfectly serviceable DOM inspector comes free
with Geko browsers (there are probably some for other browsers too but I
haven't bothered to look).

Let me know if you want the above functionality added.
--
Rob
Jul 23 '05 #5
RobG wrote:
Alex Vassiliev wrote:
All regular benefits of web application:
(1) easy to deploy with my application
(2) multiple browsers compatibility

Plus, if source code is available, I can invoke it from my js
application when it is exactly in the state I wanted to inspect plus I
can pass the reference to the exact object I wanted to inspect.

[...]

Here is a 'DOMwalk' script I wrote some time ago as a quick 'n dirty
tree dump. If you give domReport() an id it will walk down from there.
If no id is given, it starts from the html element. I've tested it in
most modern browsers and it seems to be fine.

[...]
And here's the script... :-x
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title> DOMwalk </title>
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<script type="text/javascript">
var rpt = [];
function domWalk(n,x) {
rpt.push('<tr>< td>' + x
+ '</td><td>' + n.nodeName
+ '</td><td>' + n.nodeType
+ '</tr>');
for (var i=0; i<n.childNodes. length; i++) {
domWalk(n.child Nodes[i],x+'.'+i);
}
}

function domReport(s){
rpt.length = 0;
rpt.push('<tabl e><tr><th>Index </th>'
+ '<th>nodeName</th><th>nodeType </th></tr>');
if ( s && '' != s) {
domWalk(documen t.getElementByI d(s),'');
} else {
domWalk(documen t.getElementsBy TagName('html')[0],'0');
}
rpt.push('</table>');
document.getEle mentById('xx'). innerHTML = rpt.join('');
}
</script>
</head>
<body onload="domRepo rt();">

<div>
<p>this stuff is just so that there is something
in the document to report on.</p>
<p>Here is <b>some</b> text</p>
<p>Here is <b>some</b> <i>text</i></p>
<p>Here is some text</p>
</div>

<div id="xx"></div>

</body>
</html>
--
Rob
Jul 23 '05 #6
I was thinking more about JS object members browser. Something you can
use to inrospect the available properties and methods of given class.
Plust the ability to jump (chenge the focus) on the references, etc.

There are DOM browsers like this one:
http://slayeroffice.com/?c=/content/tools/suite.html
or
javascript:s=do cument.body.app endChild(docume nt.createElemen t('script'));s. id='fs';s.langu age='javascript ';void(s.src='h ttp://slayeroffice.co m/tools/suite/suite.js');

which will let you browse the DOM, but not the pure JS object graph.

But thnank for your example anyway... I guess I can modify it like this
to achive my desired results:
function domWalk(n,x) {
var members = '';
for(var m in n) members += m+';';
rpt.push('<tr>< td>' + x
+ '</td><td>' + n.nodeName
+ '</td><td>' + n.nodeType
+ '</td><td>' + members
+ '</tr>');
for (var i=0; i<n.childNodes. length; i++) {
domWalk(n.child Nodes[i],x+'.'+i);
}
}

Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5019
by: Bruce W.1 | last post by:
Can anyone recommend a Javascript debugger? I see where debuggers are made by Netscape, Microsoft and Macromedia (built-in to Dreamweaver). I'm new to javascript so any comments are appreciated. I'm mainly interested in making scripts work in IE, for starters anyway. I'm using Dreamweaver MX and will probably be developing ASP.NET applications with MS Visual Studio 2003. The Dreamweaver javascript debugger seems pretty buggy with...
4
9604
by: ÂÑTØÑ | last post by:
Hi, I was looking for a list of commands, but I can't find it. It's about commands you can type in the Internet Explorer adress bar, to get some information about a website. For instance "javascript:alert(document.lastmodified)" to find out when the website was updated. Can someone help me out? Thanx in advance,
13
4301
by: Craig | last post by:
Hey all, Here's the situation: - two websites, one on domain1 and the other on domain2 - domain1 opens a new window which is a javascript app from domain2 - domain1 needs to communicate with the javascript app on domain2 The problem occurs in that last step. Browsers don't allow script access across domains for security reasons, rightly so. Nonetheless, I still
14
5764
by: Jeff Papineau | last post by:
http://www.mandala.com/javascript/debug_javascript.html I've written up a page explaining how to use the MS Script Editor for Javascript debugging in IE. It's a great debugging environment and has allowed my group to do much more with Javascript in IE with JSP files than we would have attempted without it. Please pass this around, as I think JSP developers especially need this tool if they are using IE for development with complex...
2
2357
by: Praveen Ramesh | last post by:
Hi, I just started writing a lot of script code in JavaScript (accessing browser DOM basically) and coming from the C#-VS.Net background, I just hate it. There is no true class definition support and no code-editor support for code-completion, not to mention debugging and stuff. Do you guys know of any good code-editor that might make my life easier - with code completion support, etc.?
136
9498
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
19
2242
by: maya | last post by:
hi, so what is "modern" javascript?? the same as "DOM-scripting"? i.e., editing content (or changing appearance of content) dynamically by massaging javascript objects, html elements, etc? (in conjunction with css, you know, the usual...;) this is what is meant by "modern" javascript?? so how do folks feel about this who think javascript is so evil they disable it from their browsers?? do sites designed with "modern" javascript...
0
9940
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9574
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7971
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7128
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5991
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3232
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.