Git Product home page Git Product logo

elm-dom's People

Contributors

aforemny avatar amitaibu avatar danstn avatar debois avatar dseebacher avatar k-adam avatar tilmans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

elm-dom's Issues

position decoder fails on SVGs in Internet Explorer 11

Hi there,

I've identified an issue where the position decoder fails when trying to determine the position of an SVG in Internet Explorer 11. The issues stems from the parentElement decoder trying to decode the parentElement field on an SVG node. (https://stackoverflow.com/questions/8685739/difference-between-dom-parentnode-and-parentelement)

parentElement : Decoder a -> Decoder a
parentElement decoder =
    field "parentElement" decoder

SVGs in IE11 do not have this attribute, instead they use parentNode.

However, this decoder works

parentElement : Decoder a -> Decoder a
parentElement decoder =
    Decode.oneOf
        [ field "parentElement" decoder
        , field "parentNode" decoder
        ]

I've tried opening a pull request with this fix, but I've been unable to do so.

thanks
John

Calling focus()

Would it be possible to not just read fields that live on other DOM nodes, but also to call events (i.e. focus)?

I think elm's decoder only accounts for JSON types, is there a way to support IO producing functions as well?

ScrollTop float ?

When using elm-dom scrollTop the decoder fails silently.
I had to use int instead of float to get this to work

scrollTop : JD.Decoder Int
scrollTop =
JD.at [ "target", "scrollTop" ] JD.int

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.