mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-09 10:31:51 +00:00
LibWeb: Extract the TextEncoderCommon mixin to its own IDL file
Co-Authored-By: Tim Flynn <trflynn89@pm.me>
This commit is contained in:
parent
c14d5f27f9
commit
24d5f24749
Notes:
github-actions[bot]
2025-02-07 16:05:58 +00:00
Author: https://github.com/Lubrsi
Commit: 24d5f24749
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3481
Reviewed-by: https://github.com/trflynn89 ✅
7 changed files with 57 additions and 14 deletions
22
Libraries/LibWeb/Encoding/TextEncoderCommon.cpp
Normal file
22
Libraries/LibWeb/Encoding/TextEncoderCommon.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Encoding/TextEncoderCommon.h>
|
||||
|
||||
namespace Web::Encoding {
|
||||
|
||||
TextEncoderCommonMixin::TextEncoderCommonMixin() = default;
|
||||
TextEncoderCommonMixin::~TextEncoderCommonMixin() = default;
|
||||
|
||||
// https://encoding.spec.whatwg.org/#dom-textencoder-encoding
|
||||
FlyString const& TextEncoderCommonMixin::encoding() const
|
||||
{
|
||||
// The encoding getter steps are to return "utf-8".
|
||||
static FlyString const encoding = "utf-8"_fly_string;
|
||||
return encoding;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue