forky_web 0.2.0

Rust Utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use web_sys::window;


pub struct Location;

impl Location {
	pub fn navigate(path: &str) {
		window().unwrap().location().set_href(path).unwrap();
	}
	pub fn navigate_replace(path: &str) {
		window().unwrap().location().replace(path).unwrap();
	}
}