May 10, 2004

Warnings from JS

Another question I had been asking myself is, "How do I throw strict warnings from JavaScript?" Well, I figured it out. The result is a file called warn.js for your chrome.

I may attempt to add them to jslib formally. (There's a glitch with b.md.o right now though.)

I also took the time this morning to figure out how to add a chrome-based project to an unjarred Mozilla from scratch. rginda's XULKit project is nice; I just wish there was an XUL project implementation.

Posted by WeirdAl at May 10, 2004 2:10 PM
Comments

Not sure I understand.
When do you need to throw a strict warning?

Posted by: Henrik Gemal at May 12, 2004 8:30 AM

I can think of a few reasons. #1 is when a feature is deprecated but still used. #2 is when there is a "bad" situation I need to notify the user/developer of, but I don't want an error to stop the script. (This can happen VERY often.) I can send it as a console message (the blue X icon) if I choose, with a simple alteration to the script, but...

Posted by: Alex Vincent at May 15, 2004 1:50 PM