Bug 1612007. Add convenience methods for throwing various spec-defined DOMExceptions on ErrorResult. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61202
This commit is contained in:
@@ -83,8 +83,7 @@ already_AddRefed<DOMIntersectionObserver> DOMIntersectionObserver::Constructor(
|
||||
observer->mRoot = aOptions.mRoot;
|
||||
|
||||
if (!observer->SetRootMargin(aOptions.mRootMargin)) {
|
||||
aRv.ThrowDOMException(NS_ERROR_DOM_SYNTAX_ERR,
|
||||
"rootMargin must be specified in pixels or percent.");
|
||||
aRv.ThrowSyntaxError("rootMargin must be specified in pixels or percent.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user