-
Notifications
You must be signed in to change notification settings - Fork 18
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
Update document.querySelectorAll element selectors #50
Labels
Comments
@TheGrimJam So, you mean you want to change instances like
querySelectorAll or, do you want to change instances of querySelectorAll()[0] to just querySelectorAll() i.e. get an Array back?
|
The latter. Get an array back and update any functions that do something
like element.style.opacity = "1" so that they will work on each element.
Preferably without adding extra for loops to every function ( it should
still be a one liner )
…On Thu, 11 Oct 2018, 19:33 Schalk Neethling, ***@***.***> wrote:
@TheGrimJam <https://github.com/TheGrimJam> So, you mean you want to
change instances like
https://github.com/DevvitIO/Multiplayer-Hangman/blob/de51051dfc80b804d2fe0448175523227ab97152/client/clientDisplay.js#L84
to use querySelectorAll or, do you want to change instances of
querySelectorAll()[0] to just querySelectorAll() i.e. get an Array back?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#50 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALQndnGuUQfsTTFnEe6is7ofFzhRIupaks5uj47fgaJpZM4XXs8V>
.
|
I'll grab this one then ;) |
Go ahead - pretend it's assigned, my ISP are still failing me.
…On Sat, 13 Oct 2018, 12:03 Schalk Neethling, ***@***.***> wrote:
I'll grab this one then ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#50 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALQndm_uFgo2ipuuHoFtp-MMU3tGW4ZBks5ukchngaJpZM4XXs8V>
.
|
@TheGrimJam I see there is this PR #54 which takes a different approach, changing from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment I've changed a good portion of the getElementByID to querySelectorAll()[0]. This is essentially the same thing, but any DOM actions we take on these should be applied to all elements ( i.e we remove the [0] ).
i.e we should be able to create two objects with a data-online-players attribute and they both display players without any extra finangling
The text was updated successfully, but these errors were encountered: