From 6bf2f869e141121959b23e7168ea9ec93b0f2082 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 5 Aug 2015 14:26:47 -0700 Subject: [PATCH] Added missing properties in 'jquery.pjax'. --- jquery.pjax/jquery.pjax-tests.ts | 2 +- jquery.pjax/jquery.pjax.d.ts | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/jquery.pjax/jquery.pjax-tests.ts b/jquery.pjax/jquery.pjax-tests.ts index 257a265dd..6af27618e 100644 --- a/jquery.pjax/jquery.pjax-tests.ts +++ b/jquery.pjax/jquery.pjax-tests.ts @@ -54,7 +54,7 @@ function test_defauluts() { dataType: 'html', container: "#pjax-container", url: "https://jquery.com/", - target: "https://jquery.com/", + target: undefined, fragment: "#pjax-response", }; } diff --git a/jquery.pjax/jquery.pjax.d.ts b/jquery.pjax/jquery.pjax.d.ts index 1bd465b1e..bc7d39209 100644 --- a/jquery.pjax/jquery.pjax.d.ts +++ b/jquery.pjax/jquery.pjax.d.ts @@ -36,7 +36,28 @@ interface PjaxSettings extends JQueryAjaxSettings { /** * How many requests to cache. Defaults to 20. */ - maxCacheLength?: number; + maxCacheLength?: number; + + /** + * A string or function returning the current pjax version + */ + version?: string | (() => string); + + /** + * Vertical position to scroll to after navigation. + * To avoid changing scroll position, pass false. + */ + scrollTo?: number | boolean; + + /** + * Eventually the relatedTarget value for pjax events. + */ + target?: EventTarget; + + /** + * CSS selector for the fragment to extract from ajax response. + */ + fragment?: string; } interface JQuery {