FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use `var module` to prevent emcc pollution by xnuk · Pull Request #518 · sql-js/sql.js · GitHub

/ sql.js Public

Use var module to prevent emcc pollution - #518

Open
xnuk wants to merge 1 commit into
sql-js:masterfrom
xnuk:patch-1
Open

Use var module to prevent emcc pollution#518
xnuk wants to merge 1 commit into
sql-js:masterfrom
xnuk:patch-1

Conversation

xnuk commented Jun 13, 2022

Copy link
Copy Markdown

for make 'use strict' compatible

lovasoa commented Jun 13, 2022

Copy link
Copy Markdown
Member

Looking at the comment above, it looks like the variable is referencing the global module on purpose.

https://nodejs.org/api/modules.html#module

lovasoa closed this Jun 13, 2022

xnuk commented Jun 13, 2022

Copy link
Copy Markdown
Author

I think it's okay, because its purpose is removing if (typeof module !== 'undefined') { module['exports'] = Module } in the emcc output. Currently emcc output does not use globalThis.module, window.module, or something else.

lovasoa commented Jun 13, 2022

Copy link
Copy Markdown
Member

Ok ! Can you add a comment about that above, then ?

lovasoa reopened this Jun 13, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL