Skip to content

Miso and jsaddle friendly wrapper around XHR #594

@niteria

Description

@niteria

Is your feature request related to a problem? Please describe.
Currently, the Miso's XHR example can't be used directly with jsaddle, because it uses JavaScript.Web.XMLHttpRequest which comes from ghcjs-base which is JSFFI only.

Describe the solution you'd like
There's an alternative that supports both jsaddle and JSFFI which is https://hackage.haskell.org/package/ghcjs-dom. Unfortunately, it's a more low-level API, a thin wrapper around JS functions.

Reflex uses ghcjs-dom to provide some higher level functions: http://hackage.haskell.org/package/reflex-dom-core-0.6.0.0/docs/src/Reflex.Dom.Xhr.html#postJson

It would be nice to have something similar for Miso.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions