Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update url even when only hash change

  • Loading branch information...
commit 21d1d30cb5695d553ee7a85ca81a54c6165b6234 1 parent d1eaaaf
@smparkes authored
Showing with 7 additions and 5 deletions.
  1. +2 −1  src/window/event.js
  2. +5 −4 src/window/location.js
View
3  src/window/event.js
@@ -101,7 +101,8 @@ function __dispatchEvent__(target, event, bubbles){
var skip = false;
if (url[0] === "#") {
- // print("return anchor only");
+ window.location.hash = url;
+ // print("return anchor only: "+window.location);
skip = true;
}
View
9 src/window/location.js
@@ -10,11 +10,12 @@ $env.__url = function(url){
};
$w.__defineSetter__("location", function(url){
- if (false) {
- if (url[0] === "#") {
- // print("return anchor only");
+ if (url[0] === "#") {
+ window.location.hash = url;
+ // print("return anchor only: "+window.location.href);
return;
- }
+ }
+ if (false) {
var now = window.location.href.replace(/^file:\/\//,"").replace(/#.*/,"");
var to = $master.first_script_window && $master.first_script_window.location.href;
// var to = $env.location(url,window.location.href != "about:blank" ? window.location.href: undefined);
Please sign in to comment.
Something went wrong with that request. Please try again.