mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:57:47 +00:00
LibWeb: Handle JS exceptions slightly sooner in CSS.escape()
This commit is contained in:
parent
82da36f129
commit
4bf88436cb
1 changed files with 2 additions and 2 deletions
|
@ -38,11 +38,11 @@ JS_DEFINE_NATIVE_FUNCTION(CSSNamespace::escape)
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
String result = Web::CSS::serialize_an_identifier(vm.argument(0).to_string(global_object));
|
auto identifier = vm.argument(0).to_string(global_object);
|
||||||
if (vm.exception())
|
if (vm.exception())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
return JS::Value(JS::js_string(vm, result));
|
return JS::js_string(vm, Web::CSS::serialize_an_identifier(identifier));
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://www.w3.org/TR/css-conditional-3/#dom-css-supports
|
// https://www.w3.org/TR/css-conditional-3/#dom-css-supports
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue