mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +00:00
LibWeb: Add PlatformObject class
This represents the "platform object" concept from the IDL spec, which refers to an object that implements an IDL interface.
This commit is contained in:
parent
71c7ac3510
commit
f6c61940f6
Notes:
sideshowbarker
2024-07-17 07:29:35 +09:00
Author: https://github.com/awesomekling
Commit: f6c61940f6
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
6 changed files with 70 additions and 10 deletions
|
@ -972,7 +972,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
|
|||
if (includes_wrappable_type) {
|
||||
// 5. If V is a platform object, then:
|
||||
union_generator.append(R"~~~(
|
||||
if (is<Wrapper>(@js_name@@js_suffix@_object)) {
|
||||
if (is<PlatformObject>(@js_name@@js_suffix@_object)) {
|
||||
)~~~");
|
||||
|
||||
// 1. If types includes an interface type that V implements, then return the IDL value that is a reference to the object V.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue