mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 22:35:09 +00:00

These classes only needed Window to get at its realm. Pass a realm directly to construct Crypto, Encoding, HRT, IntersectionObserver, NavigationTiming, Page, RequestIdleCallback, Selection, Streams, URL, and XML classes.
28 lines
604 B
C++
28 lines
604 B
C++
/*
|
|
* Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibJS/Forward.h>
|
|
#include <LibWeb/Bindings/PlatformObject.h>
|
|
|
|
namespace Web::Crypto {
|
|
|
|
class SubtleCrypto final : public Bindings::PlatformObject {
|
|
WEB_PLATFORM_OBJECT(SubtleCrypto, Bindings::PlatformObject);
|
|
|
|
public:
|
|
static JS::NonnullGCPtr<SubtleCrypto> create(JS::Realm&);
|
|
|
|
virtual ~SubtleCrypto() override;
|
|
|
|
JS::Promise* digest(String const& algorithm, JS::Handle<JS::Object> const& data);
|
|
|
|
private:
|
|
explicit SubtleCrypto(JS::Realm&);
|
|
};
|
|
|
|
}
|