TextEncoderStream: encoding プロパティ
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2022年9月.
encoding
は TextEncoderStream
インターフェイスの読み取り専用プロパティで、現在の TextEncoderStream
オブジェクトが使用するエンコーディングアルゴリズムの名前が入った文字列を返します。
値
utf-8
のエンコードされたデータが入った文字列です。
例
以下の例は、TextEncoderStream
オブジェクトが encoding
を返す方法を示しています。
js
stream = new TextEncoderStream();
console.log(stream.encoding);
仕様書
Specification |
---|
Encoding> # dom-textencoder-encoding> |
ブラウザーの互換性
Loading…