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

Refactor typed om implementation #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johannesodland
Copy link
Contributor

@johannesodland johannesodland commented Feb 4, 2024

Moving the internal implementation of typed om into its own folder.
CSSNumericValue and subclasses are split into separate files.

@bramus
Copy link
Collaborator

bramus commented Feb 4, 2024

I’d also move src/proxy-cssom.js into that folder to contain all CSSOM related polyfilling into that folder. I think it would also make sense to out the several classes into their own separate files. This is something I also considered doing in #221.

@johannesodland johannesodland force-pushed the move-typed-om-implementations branch 2 times, most recently from 9e56959 to b5a0d93 Compare February 4, 2024 10:13
@johannesodland
Copy link
Contributor Author

Yeah.. That makes sense. I didn't realize #221 was merged.

I've moved src/proxy-cssom.js also now.

Do you want me to split out some of the classes, or should we do that in a separate PR?

@bramus
Copy link
Collaborator

bramus commented Feb 4, 2024

It can go in this PR, as it's all about reorganization.

@johannesodland
Copy link
Contributor Author

Moved the token classes into a separate file now, when it comes to the CSSNumericValue classes, I think they should stay in proxy-cssom?

@bramus
Copy link
Collaborator

bramus commented Feb 4, 2024

Yes. That way, eventually, the whole cssom block can graduate to being its own package.

@bramus
Copy link
Collaborator

bramus commented Feb 4, 2024

Re-reading my comment I wasn't clear here. I interpreted "staying in CCSOM" as stay in the folder.

What I mean is: I'd split off these classes into their own files, one class per file.

@johannesodland johannesodland changed the title Move typed om implementation into a separate folder Refactor typed om implementation Feb 4, 2024
@johannesodland
Copy link
Contributor Author

Got it :)

I split the classes into their own files and switched from using a WeakMap for the internals to using private class fields.

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.

None yet

2 participants