mirror of
https://github.com/RGBCube/serenity
synced 2025-05-17 01:35:07 +00:00

This patch attaches a HTML::EventLoop to the main thread JS::VM used for JavaScript bindings in the web engine. The goal here is to model the various task scheduling mechanisms of the HTML specification.
22 lines
403 B
C++
22 lines
403 B
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibJS/Forward.h>
|
|
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
|
|
|
namespace Web::Bindings {
|
|
|
|
struct WebEngineCustomData final : public JS::VM::CustomData {
|
|
virtual ~WebEngineCustomData() override { }
|
|
|
|
HTML::EventLoop event_loop;
|
|
};
|
|
|
|
JS::VM& main_thread_vm();
|
|
|
|
}
|