kenwheeler / mcfly

Flux architecture made easy
BSD 3-Clause "New" or "Revised" License
762 stars 46 forks source link

McFly > 0.0.8 breaks in IE9 due to bind not available on console.{log,warn,error} #45

Open ronjouch opened 9 years ago

ronjouch commented 9 years ago

Amid the many strange things IE9 does, "its error/warn/log functions from the console object in IE don't inherit from Function. They are host objects, and use whatever rules IE sees fit." (quoting StackOverflow / Why can't I bind directly console.log on IE9 with developer tools open?

As a result, the var warn = (console.warn || console.log).bind(console) calls added as part of https://github.com/kenwheeler/mcfly/issues/31 and https://github.com/kenwheeler/mcfly/pull/26/ and released in McFly 0.0.8 / 0.0.9 break it :-/ :

ie9-bind-not-on-consolelogwarn

I'd give a stab at fixing it, but am not sure how you prefer to solve this; if you don't have the time (or willpower to test on IE9 ^^), tell me what you'd like and I'll make a pull request.

Thanks for your work!

kenwheeler commented 9 years ago

This is fixed in the Biff fork. I'll merge it back into McFly

ronjouch commented 9 years ago

Fantastic.

@kenwheeler I didn't know about Biff. I see you commit to both projects, what's the rationale/relationship between both?

ronjouch commented 9 years ago

Hey @kenwheeler sorry for the re-ping, I'm in the unfortunate situation of having upgraded to McFly 0.0.10 (breaking IE9 compatibility, it would be sad to revert to 0.0.8) and it looks like you / your employer are more focused on Biff, but looking at each project's README it's not clear.

→ Should I migrate to Biff? Are Biff/McFly API-compatible? Thanks.

kenwheeler commented 9 years ago

They are not. Moving to Biff is a choice to make if it fits with the problems you are trying to solve. I'll get McFly working with bind ASAP.

ronjouch commented 9 years ago

:+1: . Thanks.

ronjouch commented 9 years ago

Hi @kenwheeler, any chance Biff's IE9 fixes find their way into McFly? I'm still running my app on a forked/patched version (ronjouch/mcfly) and would like to come back to a vanilla npm package.

Also, coming back to Biff, if McFly is taking too much of your time and Biff is the maintained one, could you detail the differences between both? You say "Moving to Biff is a choice to make if it fits with the problems you are trying to solve", but it's tough as a non-expert user to make this choice, because both have very similar READMEs and it's hard to get the intent/direction just looking at the commits in Biff.

ghost commented 9 years ago

Hi @kenwheeler, any update on this issue? Are there plans for the above fix be merged into McFly?

samhunta commented 9 years ago

You can implement a Function.prototype.bind or ES6 polyfill pretty easily, has anyone tried this?

jcperez-ch commented 8 years ago

SO, was this finally fixed? I am thinking we should close the ones that are already fixed.

jcperez-ch commented 8 years ago

@kenwheeler this issue can be closed.

Merged in: https://github.com/kenwheeler/mcfly/pull/54