News for hackers. Stuff that matters.
Re:Node v6.9.0 (LTS) by nilliams on Wednesday October 19, 2016 @04:05AM (#12741965)
In my example I was talking about avoiding es6-promise polyfill in the browser, because of the fact that it adheres so strictly to the spec that it does not have an equivalent to the safety net you give in your Node example.
Re:Node v6.9.0 (LTS) by _greim_ on Friday October 21, 2016 @12:14AM (#12758109)
Yeah polyfills might not do the right thing. Natively, both exceptions and rejections stop the next thing from happening, give you a trace in the console, then everything continues at the next tick of the event loop. If a polyfill skips the trace part, that's definitely bad.
Re:Node v6.9.0 (LTS) by nilliams on Friday October 21, 2016 @03:48PM (#12763994)
Yep I know, I'm specifically complaining about the current trend of casting off old ajax methods/libraries and moving to 'fetch()' polyfills, as currently the 2 main popular fetch modules both recommend 'es6-promise' as polyfill which has serious problems in this regard: https://github.com/matthew-andrews/isomorphic-fetch/issues/1...

Technically however, what that polyfill is doing is 'on-spec'. Note that your `process.on('unhandledRejection')` thing is clearly outside spec as `process` is a Node thing, not a JS thing.