Add regex support for window.location.hash handlers
This commit is contained in:
parent
a0b7b85e8f
commit
6c39b41722
|
@ -152,6 +152,9 @@ window.onhashchange = function(e) {
|
|||
if (cfg.exact !== undefined &&
|
||||
cfg.exact === path)
|
||||
return cfg.callback(args);
|
||||
if (cfg.regex !== undefined &&
|
||||
path.match(cfg.regex))
|
||||
return cfg.callback(args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue