diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs index c62216d4683..b6a3497d019 100644 --- a/components/script/dom/bindings/error.rs +++ b/components/script/dom/bindings/error.rs @@ -34,6 +34,8 @@ pub enum Error { InvalidCharacter, /// NotSupportedError DOMException NotSupported, + /// InUseAttributeError DOMException + InUseAttribute, /// InvalidStateError DOMException InvalidState, /// SyntaxError DOMException @@ -79,6 +81,7 @@ pub fn throw_dom_exception(cx: *mut JSContext, global: GlobalRef, Error::HierarchyRequest => DOMErrorName::HierarchyRequestError, Error::InvalidCharacter => DOMErrorName::InvalidCharacterError, Error::NotSupported => DOMErrorName::NotSupportedError, + Error::InUseAttribute => DOMErrorName::InUseAttributeError, Error::InvalidState => DOMErrorName::InvalidStateError, Error::Syntax => DOMErrorName::SyntaxError, Error::NamespaceError => DOMErrorName::NamespaceError, diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs index 59f8c0a0743..d066021e304 100644 --- a/components/script/dom/domexception.rs +++ b/components/script/dom/domexception.rs @@ -23,6 +23,7 @@ pub enum DOMErrorName { NoModificationAllowedError = DOMExceptionConstants::NO_MODIFICATION_ALLOWED_ERR, NotFoundError = DOMExceptionConstants::NOT_FOUND_ERR, NotSupportedError = DOMExceptionConstants::NOT_SUPPORTED_ERR, + InUseAttributeError = DOMExceptionConstants::INUSE_ATTRIBUTE_ERR, InvalidStateError = DOMExceptionConstants::INVALID_STATE_ERR, SyntaxError = DOMExceptionConstants::SYNTAX_ERR, InvalidModificationError = DOMExceptionConstants::INVALID_MODIFICATION_ERR, @@ -83,6 +84,7 @@ impl<'a> DOMExceptionMethods for JSRef<'a, DOMException> { DOMErrorName::NoModificationAllowedError => "The object can not be modified.", DOMErrorName::NotFoundError => "The object can not be found here.", DOMErrorName::NotSupportedError => "The operation is not supported.", + DOMErrorName::InUseAttributeError => "The attribute already in use.", DOMErrorName::InvalidStateError => "The object is in an invalid state.", DOMErrorName::SyntaxError => "The string did not match the expected pattern.", DOMErrorName::InvalidModificationError => "The object can not be modified in this way.",