Section 4.15. Some browsers don t recognize Node


4.15. Some browsers don't recognize Node

Unfortunately, some web browsers don't support the Node class in your JavaScript. Your code won't run, and you're back to dealing with errors and null values.

 if (someNode.nodeTypeAll browsers support the nodeType proeprty... == Node.ELEMENT_NODE)...but several browsers report an error right here. {   // Do something with the element node } else if (someNode.nodeType == Node.TEXT_NODE) {   // Do something with the text node } 

Here's IE reporting that it doesn't recognize the Node object in your code.




Head Rush Ajax
Head Rush Ajax (Head First)
ISBN: 0596102259
EAN: 2147483647
Year: 2004
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net