-
Notifications
You must be signed in to change notification settings - Fork 12
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
Need a way to append to classList from ParallelDOM.js #1256
Comments
Initial commit made above, would like to add some tests for this. |
Tests added in 2510201. In 38959d2 I changed the usages of I did some testing after this change and the PDOM is still hidden correctly and I see the classes of PDOM elements in the inspector. @zepumph would you mind reviewing this adition? |
Looks really nice to me. the Nothing else here provided that you confirmed that this is successfully adding the class you need it to over in phetsims/a11y-research#158 |
Thanks for reviewing! I confirmed that it is working for the first case we needed it in GFL:B for phetsims/a11y-research#158 and phetsims/gravity-force-lab-basics#289 Closing. |
For phetsims/a11y-research#158, we need an ability to modify styles of individual PDOM elements. ParallelDOM.js doesn't support this right now. The reason is that setting the
style
attribute on a DOM element withsetAttribute
will blow away any previously set styles. That is a problem because some styles are set in the scenery implementation.Over slack, @zepumph and I considered solutions like
setPDOMStyleAttribute
setPDOMClass
.Setting styles directly seems fragile, and prone to having styles overridden by scenery-internals or other things. Setting the classes on the element feels more declarative. So we like that one best. I will take a shot at implementing this.
The text was updated successfully, but these errors were encountered: