04.11.2015 Views

javascript

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Contents<br />

Error Handling 473<br />

The try-catch Statement 474<br />

Throwing Errors 477<br />

The error Event 480<br />

Error-Handling Strategies 481<br />

Identify Where Errors Might Occur 481<br />

Distinguishing between Fatal and Nonfatal Errors 486<br />

Log Errors to the Server 487<br />

Debugging Techniques 488<br />

Logging Messages to a Console 488<br />

Logging Messages to the Page 491<br />

Throwing Errors 491<br />

Common Internet Explorer Errors 492<br />

Operation Aborted 493<br />

Invalid Character 494<br />

Member Not Found 494<br />

Unknown Runtime Error 495<br />

Syntax Error 495<br />

The System Cannot Locate the Resource Specified 496<br />

Debugging Tools 496<br />

Internet Explorer Debugger 496<br />

Firebug 502<br />

Drosera 507<br />

Opera JavaScript Debugger 510<br />

Other Options 513<br />

Summary 513<br />

Chapter 15: XML in JavaScript 515<br />

XML DOM Support in Browsers 515<br />

DOM Level 2 Core 515<br />

The DOMParser Type 516<br />

The XMLSerializer Type 517<br />

DOM Level 3 Load and Save 518<br />

Serializing XML 523<br />

XML in Internet Explorer 523<br />

Cross-Browser XML Processing 528<br />

XPath Support in Browsers 530<br />

DOM Level 3 XPath 530<br />

XPath in Internet Explorer 535<br />

Cross-Browser XPath 536<br />

xxii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!