Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. FileReaderSync
  4. FileReaderSync()

FileReaderSync: FileReaderSync() constructor

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

Note: This feature is only available inWeb Workers, except forService Workers.

TheFileReaderSync() constructor creates a newFileReaderSync.

Syntax

js
new FileReaderSync()

Parameters

None.

Examples

The following code snippet shows creation of aFileReaderSync object using theFileReaderSync() constructor and subsequent usage of the object:

js
function readFile(blob) {  const reader = new FileReaderSync();  postMessage(reader.readAsDataURL(blob));}

Note:This snippet must be used inside aWorker, as synchronous interfaces can't be used on the main thread.

Specifications

Specification
File API
# filereadersyncConstrctr

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp