Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wrap the BackgroundImageCache execCommand call in try/catch to avoid …

…errors in some IE versions like the spoon.net IE6. Suggested by Bryan Elliott (@fordiman on Twitter).
  • Loading branch information...
commit 119c8d41f3ed02d67ac2ebd48e869393402849c5 1 parent 8dd6656
Jason Johnston authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 sources/PIE_open.js
View
4 sources/PIE_open.js
@@ -12,7 +12,9 @@ if( !PIE ) {
};
// Force the background cache to be used. No reason it shouldn't be.
- doc.execCommand( 'BackgroundImageCache', false, true );
+ try {
+ doc.execCommand( 'BackgroundImageCache', false, true );
+ } catch(e) {}
/*
* IE version detection approach by James Padolsey, with modifications -- from
Please sign in to comment.
Something went wrong with that request. Please try again.