/* * Copyright (c) 2021, sin-ack * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Web::HTML { WebIDL::ExceptionOr> TextMetrics::create(JS::Realm& realm) { return MUST_OR_THROW_OOM(realm.heap().allocate(realm, realm)); } TextMetrics::TextMetrics(JS::Realm& realm) : PlatformObject(realm) { } TextMetrics::~TextMetrics() = default; JS::ThrowCompletionOr TextMetrics::initialize(JS::Realm& realm) { MUST_OR_THROW_OOM(Base::initialize(realm)); set_prototype(&Bindings::ensure_web_prototype(realm, "TextMetrics")); return {}; } }