Skip to content

Add a mechanism for testing whether feature is present #30

@realityforge

Description

@realityforge

Sometimes a particular property/operator is only available on some browsers. The generator will generate the field/methods regardless and the downstream consumer is left to try and feature detect in some other way. The simplest approach may be to just generate a @JsOverlay boolean supportsMyFeature() method that will allow caller to detect whether a feature is supported.

It would be too costly to generate supports*() methods for every feature so maybe the generator could load the canisue database and only generate supports*() methods if they are not supported compared to a particular base line (IE11?).

See also #29 because these features could be combined and driven by the same data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions