File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ CRITICAL (may break existing content)
2323- Fixed issue with XHR scripts and maxConnections.
2424- Added an argument to LoadQueue to specify a crossOrigin property on images tags generated by PreloadJS.
2525- included a sample htaccess file in /extras that can be used to serve CORS-safe images.
26+ - Wrapped XML parsing in a try/catch. CocoonJS doesn't support it, and Opera has occasional issues with XML.
2627
2728
2829Version 0.4.0 [September 25, 2013]
Original file line number Diff line number Diff line change @@ -588,14 +588,18 @@ this.createjs = this.createjs || {};
588588 */
589589 p . _parseXML = function ( text , type ) {
590590 var xml = null ;
591- if ( window . DOMParser ) {
592- var parser = new DOMParser ( ) ;
593- xml = parser . parseFromString ( text , type ) ; // OJR Opera throws DOMException: NOT_SUPPORTED_ERR // potential solution https://gist.github.com/1129031
594- } else { // IE
595- xml = new ActiveXObject ( "Microsoft.XMLDOM" ) ;
596- xml . async = false ;
597- xml . loadXML ( text ) ;
598- }
591+ try {
592+ // CocoonJS does not support XML parsing with either method.
593+ // Windows (?) Opera DOMParser throws DOMException: NOT_SUPPORTED_ERR // potential solution https://gist.github.com/1129031
594+ if ( window . DOMParser ) {
595+ var parser = new DOMParser ( ) ;
596+ xml = parser . parseFromString ( text , type ) ;
597+ } else { // IE
598+ xml = new ActiveXObject ( "Microsoft.XMLDOM" ) ;
599+ xml . async = false ;
600+ xml . loadXML ( text ) ;
601+ }
602+ } catch ( e ) { }
599603 return xml ;
600604 } ;
601605
You can’t perform that action at this time.
0 commit comments