webrtcHacks / adapter

Shim to insulate apps from spec changes and prefix differences. Latest adapter.js release:
https://webrtcHacks.github.io/adapter/adapter-latest.js
BSD 3-Clause "New" or "Revised" License
3.62k stars 846 forks source link

dont modify the window object #125

Closed yocontra closed 9 years ago

yocontra commented 9 years ago

When using this as a npm module, please don't modify the window object. This breaks encapsulation and makes this incompatible with other WebRTC tooling (temasys, iosrtc, others). Overriding globals is generally a bad idea, but doing it in an npm module on require is especially bad.

xdumaine commented 9 years ago

Dup of #8, night?

fippo commented 9 years ago

no, #8 is about the non-module version, not about modification of window.

I do not see how not exporting RTCSessionDescription et al helps writing spec-compliant code -- which is the requirement solved by adapter.

yocontra commented 9 years ago

@fippo You don't care that your library breaks compatibility with a whole suite of tools? Okay, cool. I'll make sure to check the packages I install to ensure they don't use this because it breaks all of our other tooling the second it gets required.