Replace downcast with is

This commit is contained in:
DarkDrek 2017-07-30 02:29:10 +02:00
parent 3ef182ca36
commit 53476f2397
2 changed files with 2 additions and 2 deletions

View file

@ -392,7 +392,7 @@ pub fn handle_is_selected(documents: &Documents,
else if let Some(option_element) = node.downcast::<HTMLOptionElement>() {
Ok(option_element.Selected())
}
else if let Some(_) = node.downcast::<HTMLElement>() {
else if node.is::<HTMLElement>() {
Ok(false) // regular elements are not selectable
} else {
Err(())