Please remove dependency on this being defined.
Please remove the dependency on this being defined. Doing so will allow notebookjs to be use with import in addition to require.
Here is the problem: If I want to use notebookjs client-side in an enviroment that uses import instead of require, the import statement fails when it reaches line 6, because this (and therefore root) are undefined.
var root = this;
var isBrowser = root.window !== undefined;
(Changing line 5 to var root = this || globalThis addresses my issue; but, I don't know enough about different JavaScript module systems to say that this solution is robust or complete.)
Thank you. Can you share a minimal script that reproduces the error you see, so that I can take it into account while reviewing the proposed change?
This repo both demonstrates the error and demonstrates how I intend to use the modified package: https://github.com/kurmasz/notebookjs_mre
Thanks again, and apologies again for the delay in responding/merging. Let me know if you encounter issues even after the merge of #55.