anchor.diff:                  JS.Window.History.PushState(null, null, url)
           )
           var
  +
  +open System.Runtime.CompilerServices
   
   [<Extension; JavaScript>]
   type RouterExtensions =
  
positive.code:     
      /// Installs client-side routing on the hash part of the URL. 
      /// If initials URL parse fails, value is set to `onParseError`. 
      let InstallHash onParseError router =
          let parse p = Parse router p   
          let cur() : 'U =
              let p = JS.Window.Location.Hash |> Route.FromHash
              Console.Log("hash navigation", JS.Window.Location.Hash, p)
              match parse p with
              | Some a -> 
                  Console.Log("parsed: ", box a)
                  a
              | None ->
                  printfn "Failed to parse route: %s" (p.ToLink()) 
  
negative.code:         JS.Window.Onhashchange <- fun ev -> set (cur()) 
  
          JQuery.JQuery.Of(JS.Document.Body).Click(fun el ev ->
              match JQuery.JQuery.Of(ev.Target).Closest("a").ToArray() with
              | [| target |] ->
                  if target.LocalName = "a" then
                      let href = target.GetAttribute("href")
                      if not (isNull href) && href.StartsWith "#" then
                          let p = Route.FromHash(href, true)
                          match parse p with
                          | Some a -> 
                              set a
                              ev.PreventDefault()
                          | None -> ()
              | _ -> ()
          ).Ignore
          
          var.View
  