Skip to content

Commit

Permalink
Wrap the BackgroundImageCache execCommand call in try/catch to avoid …
Browse files Browse the repository at this point in the history
…errors in some IE versions like the spoon.net IE6. Suggested by Bryan Elliott (@fordiman on Twitter).
  • Loading branch information
Jason Johnston committed Nov 13, 2010
1 parent 8dd6656 commit 119c8d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sources/PIE_open.js
Expand Up @@ -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
Expand Down

0 comments on commit 119c8d4

Please sign in to comment.