Liking cljdoc? Tell your friends :D

web.TextEncoder

TextEncoder takes a stream of code points as input and emits stream of bytes. For a more scalable, non-native library, see – a C-like representation of strings based on typed arrays.

TextEncoder takes a stream of code points as input and emits
stream of bytes. For a more scalable, non-native library, see
– a C-like representation of strings based on typed arrays.
raw docstring

constructorcljs

(constructor & args)

Constructor.

The TextEncoder() constructor returns a newly created utf-8 web.TextEncoder object.

TextEncoder() takes no parameters since Firefox 48 and Chrome 53

Note: Prior to Firefox 48 and Chrome 53, an encoding type label was accepted as a paramer to the TextEncoder object, since then both browers have removed support for any encoder type other than utf-8, to match the spec. Any type label passed into the TextEncoder constructor will now be ignored and a utf-8 TextEncoder will be created.

See also: https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/TextEncoder

Constructor.

The TextEncoder() constructor returns a newly created utf-8 `web.TextEncoder` object.

TextEncoder() takes no parameters since Firefox 48 and Chrome 53



Note: Prior to Firefox 48 and Chrome 53, an encoding type label was accepted as a paramer to the TextEncoder object, since then both browers have removed support for any encoder type other than utf-8, to match the spec. Any type label passed into the TextEncoder constructor will now be ignored and a utf-8 TextEncoder will be created.

See also: `https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/TextEncoder`
sourceraw docstring

encodecljs

(encode this string)

Method.

The TextEncoder.prototype.encode() method takes a web.USVString input, and returns a js.Uint8Array containing the text given parameters encoded with the specific method for that TextEncoder

b1 = encoder.encode(string);

See also: https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/encode

Method.

The TextEncoder.prototype.encode() method takes a `web.USVString`
input, and returns a `js.Uint8Array` containing the text given
parameters encoded with the specific method for that TextEncoder

`b1 = encoder.encode(string);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/encode`
sourceraw docstring

encode-intocljs

(encode-into this string uint8array)

Method.

[Experimental]

The TextEncoder.prototype.encodeInto() method takes a web.USVString encode and a destination js.Uint8Array to put resulting UTF-8 text into, and returns a dictionary object indicating the progress the encoding. This is potentially more performant than the older method especially when the target buffer is a view into a Wasm

b1 = encoder.encodeInto(string, uint8Array);

See also: https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/encodeInto

Method.

[Experimental]

The TextEncoder.prototype.encodeInto() method takes a `web.USVString`
encode and a destination `js.Uint8Array` to put resulting UTF-8
text into, and returns a dictionary object indicating the progress
the encoding. This is potentially more performant than the older
method especially when the target buffer is a view into a Wasm

`b1 = encoder.encodeInto(string, uint8Array);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/encodeInto`
sourceraw docstring

encodingcljs

(encoding this)

Property.

[Read Only]

The TextEncoder.encoding read-only property returns a web.DOMString the name of the encoding algorithm used by the specific encoder.

b = encoder.encoding;

See also: https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/encoding

Property.

[Read Only]

The TextEncoder.encoding read-only property returns a `web.DOMString`
the name of the encoding algorithm used by the specific encoder.

`b = encoder.encoding;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/encoding`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close