use crate::Web;
use crate::{_js_doc, _js_extern, js_int32};
#[rustfmt::skip]
impl Web {
#[doc = _js_doc!("History", "back")]
pub fn history_back() { unsafe { history_back(); } }
#[doc = _js_doc!("History", "forward")]
pub fn history_forward() { unsafe { history_forward(); } }
#[doc = _js_doc!("History", "go")]
pub fn history_go(delta: js_int32) { unsafe { history_go(delta); } }
#[doc = _js_doc!("History", "pushState")]
pub fn history_push_state(state: &str, title: &str, url: &str) {
unsafe { history_push_state(state.as_ptr(), state.len(), title.as_ptr(), title.len(),
url.as_ptr(), url.len()); }
}
#[doc = _js_doc!("History", "replaceState")]
pub fn history_replace_state(state: &str, title: &str, url: &str) {
unsafe { history_replace_state(state.as_ptr(), state.len(), title.as_ptr(), title.len(),
url.as_ptr(), url.len()); }
}
#[doc = _js_doc!("Location", "reload")]
pub fn location_reload() { unsafe { location_reload(); } }
#[doc = _js_doc!("Location", "assign")]
pub fn location_assign(url: &str) { unsafe { location_assign(url.as_ptr(), url.len()); } }
#[doc = _js_doc!("Location", "replace")]
pub fn location_replace(url: &str) { unsafe { location_replace(url.as_ptr(), url.len()); } }
}
_js_extern! {
[ module: "api_history_location" ]
unsafe fn history_back();
unsafe fn history_forward();
unsafe fn history_go(delta: js_int32);
unsafe fn "history_pushState" history_push_state(state_ptr: *const u8, state_len: usize,
title_ptr: *const u8, title_len: usize, url_ptr: *const u8, url_len: usize);
unsafe fn "history_replaceState" history_replace_state(state_ptr: *const u8, state_len: usize,
title_ptr: *const u8, title_len: usize, url_ptr: *const u8, url_len: usize);
unsafe fn location_reload();
unsafe fn location_assign(url_ptr: *const u8, url_len: usize);
unsafe fn location_replace(url_ptr: *const u8, url_len: usize);
}