There's an issue with instanceof
and object coming from different frames, e.g.
- feross/buffer#166
- https://bugs.webkit.org/show_bug.cgi?id=185906 (data retrieved from indexedDB constructed from another frame...)
Several implementations of the workaround using Object.prototype.toString.call(...)
: