Report exceptions to JS when the DOM implementation fails.

As a bonus, adds some debugging statements.
This commit is contained in:
Ms2ger 2013-10-23 08:19:26 +02:00
parent c5db2ab516
commit 29a7405b4e
4 changed files with 24 additions and 6 deletions

View file

@ -194,6 +194,7 @@ impl Document {
pub fn CreateElement(&self, abstract_self: AbstractDocument, local_name: DOMString) -> Fallible<AbstractNode<ScriptView>> {
if xml_name_type(local_name) == InvalidXMLName {
debug!("Not a valid element name");
return Err(InvalidCharacter);
}
let local_name = local_name.to_ascii_lower();