WebContent: Create an execution context when getting an element property

Calling Object::get requires a running execution context.
This commit is contained in:
Timothy Flynn 2024-10-08 16:45:02 -04:00 committed by Andreas Kling
parent 96de4ef7e0
commit cbf8f1495c
Notes: github-actions[bot] 2024-10-10 08:42:44 +00:00

View file

@ -1108,6 +1108,8 @@ Messages::WebDriverClient::GetElementPropertyResponse WebDriverConnection::get_e
Optional<ByteString> result;
// 4. Let property be the result of calling the Object.[[GetProperty]](name) on element.
Web::HTML::TemporaryExecutionContext execution_context { current_browsing_context().active_document()->relevant_settings_object() };
if (auto property_or_error = element->get(name.to_byte_string()); !property_or_error.is_throw_completion()) {
auto property = property_or_error.release_value();