Move EventTargetTypeId/NodeTypeId to DOMClass

This commit is contained in:
Michael Wu 2015-07-10 21:27:41 -04:00 committed by Anthony Ramine
parent 8d7ba12f28
commit 941f7dc04b
24 changed files with 149 additions and 74 deletions

View file

@ -184,6 +184,8 @@ impl<'a> Serializable for &'a Node {
traversal_scope: TraversalScope) -> io::Result<()> {
let node = *self;
match (traversal_scope, node.type_id()) {
(_, NodeTypeId::Node) => unreachable!(),
(_, NodeTypeId::CharacterData(CharacterDataTypeId::CharacterData)) => unreachable!(),
(_, NodeTypeId::Element(..)) => {
let elem = ElementCast::to_ref(node).unwrap();
let name = QualName::new(elem.namespace().clone(),