WebContent: Create an execution context when getting an element property
Calling Object::get requires a running execution context.
This commit is contained in:
parent
96de4ef7e0
commit
cbf8f1495c
Notes:
github-actions[bot]
2024-10-10 08:42:44 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/cbf8f1495cc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1706
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue