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 support for clss selection #13

Merged
merged 2 commits into from Jun 1, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Support css class selection (2)

  • Loading branch information
ILyoan committed May 31, 2013
commit 6831381285f766bab2aed7f62eb858df1fa3a46a
@@ -89,6 +89,7 @@ pub trait SelectHandler<N> {
fn with_node_id<R>(&self, node: &N, f: &fn(Option<&str>) -> R) -> R;
fn named_parent_node(&self, node: &N, name: &str) -> Option<N>;
fn parent_node(&self, node: &N) -> Option<N>;
fn node_has_class(&self, node: &N, &str) -> bool;
fn node_has_id(&self, node: &N, &str) -> bool;
fn named_ancestor_node(&self, node: &N, name: &str) -> Option<N>;
fn node_is_root(&self, node: &N) -> bool;
@@ -142,6 +143,10 @@ impl<N, H: SelectHandler<N>> n::s::CssSelectHandler<N> for SelectHandlerWrapper<
self.inner_ref().parent_node(node)
}

fn node_has_class(&self, node: &N, name: LwcString) -> bool {
self.inner_ref().node_has_class(node, name.to_str_slice())
}

fn node_has_id(&self, node: &N, name: LwcString) -> bool {
self.inner_ref().node_has_id(node, name.to_str_slice())
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.