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

Add CSS Selector Example to XPATH Section #8

Closed
runderwood opened this issue Jun 1, 2017 · 3 comments
Closed

Add CSS Selector Example to XPATH Section #8

runderwood opened this issue Jun 1, 2017 · 3 comments

Comments

@runderwood
Copy link
Collaborator

@runderwood runderwood commented Jun 1, 2017

In addition to using XPATH, also demonstrate document navigation in the browser console using querySelector and querySelectorAll with CSS selectors.

@runderwood runderwood added this to Identified in Moz-Sprint-2017 Jun 1, 2017
@runderwood runderwood moved this from Identified to Discussed in Moz-Sprint-2017 Jun 1, 2017
@runderwood runderwood changed the title Add CSS Selector Example to Intro Add CSS Selector Example to XPATH Section Jun 1, 2017
@jnothman
Copy link
Contributor

@jnothman jnothman commented Jul 4, 2017

I think this can be closed as current version demonstrates CSS selectors

@ldko
Copy link
Collaborator

@ldko ldko commented Jul 5, 2017

Before closing this, do you think it is worth putting querySelector into the lesson? Currently, if one element is desired to be selected, the examples show using querySelectorAll then selecting the first element from the resulting list. querySelector could be used instead of querySelectorAll or mentioned as an alternative on the document.querySelectorAll("html > head > title")[0] example or on the Select the blockquote titled “Overview” challenge or in the Class and ID filtering section.

On a related note, one of the Key Points of demonstrates CSS selectors says CSS selectors can be evaluated using the document.querySelector() function. document.querySelectorAll() should probably be listed here instead (or in addition if document.querySelector() gets worked into the episode).

@jnothman
Copy link
Contributor

@jnothman jnothman commented Jul 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants