From 0af5dfd73ba3fc4071492be0ab0657aa4aaa5f5f Mon Sep 17 00:00:00 2001 From: Junle Date: Wed, 18 Jun 2014 16:40:00 +0800 Subject: [PATCH] Add definition and test for $.pjax.reload method. --- jquery.pjax/jquery.pjax-tests.ts | 4 ++++ jquery.pjax/jquery.pjax.d.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index d5a9e1bb1..b821ee14d 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -37,3 +37,7 @@ function test_enable() { function test_disable() { $.pjax.disable(); } + +function test_reload() { + $.pjax.reload(); +} diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index f26d69443..51e059a2b 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -120,4 +120,9 @@ interface PjaxStatic { * This is the case when a browser doesn't support pushState. It is sometimes useful to disable pushState for debugging on a modern browser. */ disable(): void; + + /** + * Reload current page with pjax. + */ + reload(): JQueryXHR; }