mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement CSSStyleSheet::replaceSync (#36586)
Implements the `replaceSync` method on CSSStyleSheet Testing: Covered by wpt tests. Expectations are updated. Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
5d3cbc67ee
commit
30fdf48ca6
12 changed files with 47 additions and 162 deletions
|
@ -53,6 +53,7 @@ pub(crate) enum DOMErrorName {
|
|||
NotReadableError,
|
||||
DataError,
|
||||
OperationError,
|
||||
NotAllowedError,
|
||||
}
|
||||
|
||||
impl DOMErrorName {
|
||||
|
@ -84,6 +85,7 @@ impl DOMErrorName {
|
|||
"NotReadableError" => Some(DOMErrorName::NotReadableError),
|
||||
"DataError" => Some(DOMErrorName::DataError),
|
||||
"OperationError" => Some(DOMErrorName::OperationError),
|
||||
"NotAllowedError" => Some(DOMErrorName::NotAllowedError),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
@ -135,6 +137,10 @@ impl DOMException {
|
|||
DOMErrorName::OperationError => {
|
||||
"The operation failed for an operation-specific reason."
|
||||
},
|
||||
DOMErrorName::NotAllowedError => {
|
||||
r#"The request is not allowed by the user agent or the platform in the current context,
|
||||
possibly because the user denied permission."#
|
||||
},
|
||||
};
|
||||
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue