mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:27:35 +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
6 changed files with 70 additions and 10 deletions
24
Userland/Libraries/LibWeb/Bindings/PlatformObject.h
Normal file
24
Userland/Libraries/LibWeb/Bindings/PlatformObject.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
||||
// https://webidl.spec.whatwg.org/#dfn-platform-object
|
||||
class PlatformObject : public JS::Object {
|
||||
JS_OBJECT(PlatformObject, JS::Object);
|
||||
|
||||
public:
|
||||
virtual ~PlatformObject() override;
|
||||
|
||||
protected:
|
||||
explicit PlatformObject(JS::Object& prototype);
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue