Added missing properties in 'jquery.pjax'.

This commit is contained in:
Daniel Rosenwasser
2015-08-05 14:26:47 -07:00
parent 4b4fd6dd16
commit 6bf2f869e1
2 changed files with 23 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ function test_defauluts() {
dataType: 'html',
container: "#pjax-container",
url: "https://jquery.com/",
target: "https://jquery.com/",
target: <EventTarget>undefined,
fragment: "#pjax-response",
};
}

View File

@@ -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 {