We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/elm-lang/html/issues/110
The text was updated successfully, but these errors were encountered:
update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of NewLocation location -> let newRoute = parseLocation location in { model | page = newRoute } ! [] NewPage page -> model ! [ Navigation.newUrl (Routing.pageToUrl page) ] href : ( Route -> Cmd Msg) -> Route -> List (Attribute Msg) href msg route = [ href (routeToString route) , onPreventDefaultClick (msg route) ] onPreventDefaultClick : msg -> Attribute msg onPreventDefaultClick message = onWithOptions "click" { defaultOptions | preventDefault = True } (preventDefault2 |> Json.Decode.andThen (maybePreventDefault message) ) preventDefault2 : Decoder Bool preventDefault2 = Json.Decode.map2 (invertedOr) (Json.Decode.field "ctrlKey" Json.Decode.bool) (Json.Decode.field "metaKey" Json.Decode.bool) maybePreventDefault : msg -> Bool -> Decoder msg maybePreventDefault msg preventDefault = case preventDefault of True -> Json.Decode.succeed msg False -> Json.Decode.fail "Normal link" invertedOr : Bool -> Bool -> Bool invertedOr x y = not (x || y)
Sorry, something went wrong.
No branches or pull requests
https://github.com/elm-lang/html/issues/110
The text was updated successfully, but these errors were encountered: