Преглед на файлове

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;
     Optional<ByteString> result;
 
 
     // 4. Let property be the result of calling the Object.[[GetProperty]](name) on element.
     // 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()) {
     if (auto property_or_error = element->get(name.to_byte_string()); !property_or_error.is_throw_completion()) {
         auto property = property_or_error.release_value();
         auto property = property_or_error.release_value();