mbest / knockout-deferred-updates

Deferred Updates plugin for Knockout <=3.3.0
http://mbest.github.io/knockout-deferred-updates/
134 stars 23 forks source link

IE8 Compatibility - try...finally blocks #11

Closed Morgma closed 11 years ago

Morgma commented 11 years ago

In Internet Explorer less than or equal to version 8, I receive an error that "Object doesn't support this property or method". The debugger points to the try{}finally{} blocks.

Adding a inert catch statement should make the solution more cross-ie friendly: catch (e) { }

For reference, a similar bug arose in jQuery: http://bugs.jquery.com/ticket/9033

I believe the eventual solution for the jQuery team was to avoid the try...finally altogether, but for this plugin, adding the catch seems to work though I haven't fully tested.

mbest commented 11 years ago

From what I understand, the try/finally block doesn't cause the error. It's coming from somewhere else in your code. It's just that IE8 loses track of where the error actually occurred if it happens within a try/finally block. To debug, you can just comment out the try/finally to figure out where the error actually is.

Morgma commented 11 years ago

Thanks for the update. Adding the catches may have just hidden the error from me. I'll take a closer look.