浏览代码

WebContent: Create an execution context when getting an element property

Calling Object::get requires a running execution context.
Timothy Flynn 9 月之前
父节点
当前提交
cbf8f1495c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Userland/Services/WebContent/WebDriverConnection.cpp

+ 2 - 0
Userland/Services/WebContent/WebDriverConnection.cpp

@@ -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();