mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add definition and test for $.pjax.defaults property.
This commit is contained in:
@@ -41,3 +41,16 @@ function test_disable() {
|
||||
function test_reload() {
|
||||
$.pjax.reload();
|
||||
}
|
||||
|
||||
function test_defauluts() {
|
||||
$.pjax.defaults = {
|
||||
timeout: 650,
|
||||
push: true,
|
||||
replace: false,
|
||||
type: 'GET',
|
||||
dataType: 'html',
|
||||
scrollTo: 0,
|
||||
maxCacheLength: 20,
|
||||
version: $.noop
|
||||
};
|
||||
}
|
||||
|
||||
Vendored
+5
@@ -58,6 +58,11 @@ interface JQueryStatic {
|
||||
}
|
||||
|
||||
interface PjaxStatic {
|
||||
/**
|
||||
* PJAX default settings.
|
||||
*/
|
||||
defaults: PjaxSettings;
|
||||
|
||||
/**
|
||||
* Loads a URL with ajax, puts the response body inside a container, then pushState()'s the loaded URL.
|
||||
* Works just like $.ajax in that it accepts a jQuery ajax settings object (with keys like url, type, data, etc).
|
||||
|
||||
Reference in New Issue
Block a user