mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-06 16:20:26 +08:00
History.js definitions and tests added
This commit is contained in:
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for History.js
|
||||
// Project: https://github.com/balupton/History.js
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface HistoryAdapter {
|
||||
bind(element, event, callback);
|
||||
trigger(element, event);
|
||||
onDomLoad(callback);
|
||||
}
|
||||
|
||||
interface HistoryStatic {
|
||||
enabled: bool;
|
||||
pushState(data, title, url);
|
||||
replaceState(data, title, url);
|
||||
getState();
|
||||
getHash();
|
||||
Adapter: HistoryAdapter;
|
||||
back();
|
||||
forward();
|
||||
go(X);
|
||||
log(...messages: any[]);
|
||||
debug(...messages: any[]);
|
||||
}
|
||||
|
||||
declare var History: HistoryStatic;
|
||||
Reference in New Issue
Block a user