[thelist] Checking javascript syntax

Peter-Paul Koch pp.koch at gmail.com
Tue Jan 11 10:28:09 CST 2005


> I am new to this list and I don't know if this has
> been asked before. I've tried to search the archives
> but I haven't found an answer to that. So, sorry if
> this has been posted before.
> 
> Is there a way to check that a javascript code is
> right? Is there a way to check that a javascript code
> conforms to W3C DOM 1 when accessing to html content?

If it works in Mozilla it's W3C DOM compatible. If it doesn't it isn't.

Well, it's slightly more complicated than that (Moz has a few bugs),
but starting with a rigorous Mozilla test is the best way to test your
script. If it doesn't work, check the JavaScript console, which gives
by far the best error messages you can get.

Of course, even if your script works in Mozilla it may not work in
other browsers. Visit http://www.quirksmode.org/dom/ for a detailed
list of what works and what doesn't work in the various browsers.

-- 
-------------------------------------------------------------------
ppk, freelance web developer

Bug Report: Report bugs yourself, or comment on previously 
reported ones.
http://www.quirksmode.org/bugreports/
------------------------------------------------------------------


More information about the thelist mailing list