elm-program-test icon indicating copy to clipboard operation
elm-program-test copied to clipboard

Support testing navigation in non-application apps

Open avh4 opened this issue 5 years ago • 3 comments

https://github.com/elm/browser/blob/master/notes/navigation-in-elements.md

avh4 avatar May 28 '19 01:05 avh4

SimulatedEffect needs PushUrl/ modifyUrl variants

avh4 avatar Jun 01 '19 00:06 avh4

This should be possible now, but it would be good to add an example of how to do it.

avh4 avatar Jun 26 '19 02:06 avh4

Proposed API

withGlobalDomEventHandler : 
  (eventName: String
    -> event: Json.Value (includes target.href)
    -> { stopPropagation : Bool
         , preventDefault : Bool
         , produceIncomingPortValues : 
             [ (String, Json.Value) ]
          }
  -> ProgramTest.ProgramDefintion
  -> ProgramTest.ProgramDefintion

avh4 avatar May 21 '20 00:05 avh4