Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 7, 2024

127 or the 150 references to Module['canvas'] were already quoted. In general this is how we handle properties of the Module object that we don't want closure to minify. Once I do the same for the ctx object we can remove the closure type annotation completely from shell.js.

127 or the 150 references to Module['canvas'] were already quoted.  In
general this is how we handle properties of the Module object that we
don't want closure to minify.  Once I do the same for the ctx object
we can remove the closure type annotation completely from shell.js.
@kripken
Copy link
Member

kripken commented Nov 7, 2024

Do we want this to remain on Module? I don't remember a reason for users to access it after construction, but I might be wrong.

If we just need it during construction then we could receive it from Module and then access it like GLctx?

@sbc100
Copy link
Collaborator Author

sbc100 commented Nov 7, 2024

Do we want this to remain on Module? I don't remember a reason for users to access it after construction, but I might be wrong.

If we just need it during construction then we could receive it from Module and then access it like GLctx?

Thats kind of my long term plan yes.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, this sounds good as a step then.

@sbc100 sbc100 merged commit 4b3bace into emscripten-core:main Nov 7, 2024
28 checks passed
@sbc100 sbc100 deleted the canvas_quote branch November 7, 2024 18:15
uysalibov pushed a commit to uysalibov/emscripten that referenced this pull request Nov 7, 2024
127 or the 150 references to Module['canvas'] were already quoted. In
general this is how we handle properties of the Module object that we
don't want closure to minify. Once I do the same for the ctx object we
can remove the closure type annotation completely from shell.js.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Nov 7, 2024
This was the last property explicitly listed in the closure type
annotate for the `Module` object.  This means that it was previously
being preserved by closure via this mechanism, but now we preserve it
via the normal quoting mechanism.

I've been looking at removing `ctx` and `canvas` from the `Module`
object, but this change is just about consistency.

See emscripten-core#22876
uysalibov pushed a commit to uysalibov/emscripten that referenced this pull request Nov 15, 2024
127 or the 150 references to Module['canvas'] were already quoted. In
general this is how we handle properties of the Module object that we
don't want closure to minify. Once I do the same for the ctx object we
can remove the closure type annotation completely from shell.js.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Nov 26, 2024
This was the last property explicitly listed in the closure type
annotate for the `Module` object.  This means that it was previously
being preserved by closure via this mechanism, but now we preserve it
via the normal quoting mechanism.

I've been looking at removing `ctx` and `canvas` from the `Module`
object, but this change is just about consistency.

See emscripten-core#22876
sbc100 added a commit that referenced this pull request Nov 26, 2024
This was the last property explicitly listed in the closure type
annotate for the `Module` object. This means that it was previously
being preserved by closure via this mechanism, but now we preserve it
via the normal quoting mechanism.

I've been looking at removing `ctx` and `canvas` from the `Module`
object, but this change is just about consistency.

See #22876
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