/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace Web::HTML { MessageChannel::MessageChannel() { // 1. Set this's port 1 to a new MessagePort in this's relevant Realm. m_port1 = MessagePort::create(); // 2. Set this's port 2 to a new MessagePort in this's relevant Realm. m_port2 = MessagePort::create(); // 3. Entangle this's port 1 and this's port 2. m_port1->entangle_with(*m_port2); } MessageChannel::~MessageChannel() = default; }