mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +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 {};
|
||||
}
|
||||
|
||||
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())
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue