1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibJS: Add js_string(Interpreter&, String)

This commit is contained in:
Andreas Kling 2020-04-04 12:57:37 +02:00
parent d8e944e899
commit faac43597a
11 changed files with 33 additions and 26 deletions

View file

@ -76,7 +76,7 @@ JS::Value CanvasRenderingContext2DWrapper::fill_style_getter(JS::Interpreter& in
auto* impl = impl_from(interpreter);
if (!impl)
return {};
return JS::js_string(interpreter.heap(), impl->fill_style());
return JS::js_string(interpreter, impl->fill_style());
}
void CanvasRenderingContext2DWrapper::fill_style_setter(JS::Interpreter& interpreter, JS::Value value)

View file

@ -68,7 +68,7 @@ static Element* impl_from(JS::Interpreter& interpreter)
JS::Value ElementWrapper::inner_html_getter(JS::Interpreter& interpreter)
{
if (auto* impl = impl_from(interpreter))
return JS::js_string(interpreter.heap(), impl->inner_html());
return JS::js_string(interpreter, impl->inner_html());
return {};
}
@ -81,7 +81,7 @@ void ElementWrapper::inner_html_setter(JS::Interpreter& interpreter, JS::Value v
JS::Value ElementWrapper::id_getter(JS::Interpreter& interpreter)
{
if (auto* impl = impl_from(interpreter))
return JS::js_string(interpreter.heap(), impl->attribute("id"));
return JS::js_string(interpreter, impl->attribute("id"));
return {};
}