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

Update document.querySelectorAll element selectors #50

Open
gavinmccormack opened this issue Oct 11, 2018 · 5 comments
Open

Update document.querySelectorAll element selectors #50

gavinmccormack opened this issue Oct 11, 2018 · 5 comments

Comments

@gavinmccormack
Copy link
Contributor

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

@schalkneethling
Copy link

@TheGrimJam So, you mean you want to change instances like

var currentPartElem = document.getElementById(currentPartID);
to use querySelectorAll or, do you want to change instances of querySelectorAll()[0] to just querySelectorAll() i.e. get an Array back?

@gavinmccormack
Copy link
Contributor Author

gavinmccormack commented Oct 12, 2018 via email

@schalkneethling
Copy link

I'll grab this one then ;)

@gavinmccormack
Copy link
Contributor Author

gavinmccormack commented Oct 13, 2018 via email

@schalkneethling
Copy link

@TheGrimJam I see there is this PR #54 which takes a different approach, changing from querySelectorAll to querySelector. Is that what you were after?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants