mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
53
Libraries/LibWeb/HTML/Scripting/ImportMapParseResult.h
Normal file
53
Libraries/LibWeb/HTML/Scripting/ImportMapParseResult.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Script.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/Scripting/ImportMap.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#import-map-parse-result
|
||||
class ImportMapParseResult
|
||||
: public JS::Cell
|
||||
, public JS::Script::HostDefined {
|
||||
JS_CELL(ImportMapParseResult, JS::Cell);
|
||||
JS_DECLARE_ALLOCATOR(ImportMapParseResult);
|
||||
|
||||
public:
|
||||
virtual ~ImportMapParseResult() override;
|
||||
|
||||
static JS::NonnullGCPtr<ImportMapParseResult> create(JS::Realm& realm, ByteString const& input, URL::URL base_url);
|
||||
|
||||
[[nodiscard]] Optional<ImportMap> const& import_map() const { return m_import_map; }
|
||||
void set_import_map(ImportMap const& value) { m_import_map = value; }
|
||||
|
||||
[[nodiscard]] Optional<WebIDL::Exception> const& error_to_rethrow() const { return m_error_to_rethrow; }
|
||||
void set_error_to_rethrow(WebIDL::Exception const& value) { m_error_to_rethrow = value; }
|
||||
|
||||
void register_import_map(Window& global);
|
||||
|
||||
protected:
|
||||
ImportMapParseResult();
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
private:
|
||||
virtual void visit_host_defined_self(Visitor&) override;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#impr-import-map
|
||||
Optional<ImportMap> m_import_map;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#impr-error-to-rethrow
|
||||
Optional<WebIDL::Exception> m_error_to_rethrow;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue