hecht-software / box2dweb

Automatically exported from code.google.com/p/box2dweb
308 stars 94 forks source link

Current release throws exceptions in IE8 #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open IE8 
2. Go to http://code.google.com/p/box2dweb/

Expected to see the same homepage demo that you see in Chrome/FF/etc.

Actual: javascript error. 

I can verify this happening with both the normal and minified versions of the 
June 15 release.

Original issue reported on code.google.com by jasonkes...@gmail.com on 26 Jun 2011 at 10:09

GoogleCodeExporter commented 8 years ago
Actually, IE8 was never supported and there hasn't been a plan to support it: 
http://code.google.com/p/box2dweb/wiki/Roadmap

On the other hand, perhaps the incompatibility-issues can be solved very 
easily. I have to rethink the decision, since there are probably some users 
which require IE8...

As far as I know the main problem is the lack of getter/setter-support. Can you 
post the error-message?

Original comment by Uli.He...@googlemail.com on 29 Jun 2011 at 5:52

GoogleCodeExporter commented 8 years ago
Yeah, it's the same Object.defineProperty code that was causing issue #12.  
There's a fix in that thread that gets things mostly working in IE8, but it 
runs into other issues (which I'd be happy to enumerate in additional bug 
reports if you'd like.)

I think IE8 support is pretty important.  As much as we developers like to hate 
on Internet Explorer, it remains the most installed browser by a pretty wide 
margin.  If this library doesn't support it, then it's essentially unsuitable 
for projects targeted for the public internet.  

It actually seems like the changes needed to get it working in IE (all the way 
back to version 6) are pretty minor.  It's just a matter of not using any of 
the shiny new javascript features that have crept in with HTML5.

Original comment by jasonkes...@gmail.com on 29 Jun 2011 at 6:00

GoogleCodeExporter commented 8 years ago
I think that the fix of issue #12 doesn't work for IE8. IE9 supports 
getters/setters, but their usage was implemented incorrectly in Box2dWeb, 
whereas IE8 doesn't support them at all (only for DOM-objects). I have to 
replace the properties by methods.

The next source of errors (for the demo) is the missing canvas-support.

I think it would be a good idea to run box2dweb together with canvasex 
(http://code.google.com/p/explorercanvas/) and es5-shim 
(https://github.com/kriskowal/es5-shim/) to identify the remaining problems.

jasonkes...@gmail.com:
"which I'd be happy to enumerate in additional bug reports if you'd like."

This would be great. I can't find a way to re-install IE8 as I don't have a 
virtual machine at the moment and I don't want to uninstall IE9.

Original comment by Uli.He...@googlemail.com on 29 Jun 2011 at 6:26

GoogleCodeExporter commented 8 years ago
Sorry that I wasn't clear up above.  The fix I'm referring to is the one 
referenced in Comment #10 of Issue 12.  It's a patch from another user who 
replaced the defineProperty code with getters & setters.

I have that version working with excanvas, but it still has issues.  (including 
a few places that are using Array.prototype.indexOf)  I haven't tried using 
es5-shim yet, so hopefully that might get us a little closer.

Original comment by jasonkes...@gmail.com on 29 Jun 2011 at 9:10