/* * Copyright (c) 2021, sin-ack * * SPDX-License-Identifier: BSD-2-Clause */ #include #include namespace Web::HTML { JS::NonnullGCPtr TextMetrics::create(JS::Realm& realm) { return realm.heap().allocate(realm, realm).release_allocated_value_but_fixme_should_propagate_errors(); } 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 {}; } }