diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index b821ee14d..796b4bf91 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -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 + }; +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index 51e059a2b..82ab34020 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -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).