LibWeb: Start working on spec-aligned HTML scripting semantics

This patch adds HTML::Script and HTML::ClassicScript (subclass of the
former.)
This commit is contained in:
Andreas Kling 2021-09-09 18:03:01 +02:00
parent 612a23d6fc
commit 0839442da5
Notes: sideshowbarker 2024-07-18 04:22:18 +09:00
5 changed files with 105 additions and 0 deletions

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RefCounted.h>
#include <AK/URL.h>
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-script
class Script : public RefCounted<Script> {
public:
virtual ~Script();
URL const& base_url() const { return m_base_url; }
protected:
explicit Script(URL base_url);
private:
URL m_base_url;
};
}