Skip to content

Replace supportedFormats with static getSupportedFormats() method #54

Closed

Description

@reillyeon

The problem with the current supportedFormats attribute are two-fold,

  1. The property can be read synchronously which is incompatible with modern user agent designs which run script in a sandboxed process and so would have to cache the value of this attribute at startup in order to provide its value synchronously or pause script execution until it can be fetched asynchronously.
  2. While a developer can select the barcode formats they would like to use through BarcodeDetectorOptions they must first create a new BarcodeDetector in order to get access to this property.

This attribute should instead be (a) static and (b) a method returning a Promise.

Activity

  1. added a commit that references this issue on Jan 24, 2019
  2. yell0wd0g commented on Jan 24, 2019

    @yell0wd0g
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions