Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mesh] constructors vs factory functions #46

Open
domenic opened this issue Aug 15, 2024 · 1 comment
Open

[Mesh] constructors vs factory functions #46

domenic opened this issue Aug 15, 2024 · 1 comment
Assignees

Comments

@domenic
Copy link
Collaborator

domenic commented Aug 15, 2024

Per https://w3ctag.github.io/design-principles/#constructors, can we make these have constructors, instead of adding factory functions to CanvasRenderingContext2D?

If the constructor needs to take a CanvasRenderingContext2D as an argument to associate with the correct canvas, that's reasonable.

@fmalita
Copy link
Collaborator

fmalita commented Aug 19, 2024

Thanks Domenic, I think that makes sense.

Interestingly, in the first iteration we were using constructors. I don't recall why we changed that, probably just trying to minimize boilerplate - so if there's a reason to prefer constructors we should definitely revisit.

@fmalita fmalita self-assigned this Aug 19, 2024
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

No branches or pull requests

2 participants