rename originalIds to keepIds in HtmlHelpers API

This commit is contained in:
Felix Hamann 2019-05-19 20:04:22 +02:00
parent c4e6b757f9
commit 935fd6d7eb
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
// Returns an object with `element` being an contextual fragment of the
// HTML in the response and `ifPrefix` being the prefix that was used to
// "unique-ify" the ids of the received HTML.
// Original Response IDs can optionally be kept by adding `originalIds: true`
// Original Response IDs can optionally be kept by adding `keepIds: true`
// to the `options` object.
function parseResponse(response, options) {
options = options || {};
@ -15,7 +15,7 @@
return response.text().then(function (responseText) {
var docFrag = document.createRange().createContextualFragment(responseText);
var idPrefix;
if (!options.originalIds) {
if (!options.keepIds) {
idPrefix = _getIdPrefix();
_prefixIds(docFrag, idPrefix);
}

View File

@ -324,7 +324,7 @@
headers: headers,
accept: HttpClient.ACCEPT.TEXT_HTML,
}).then(function(response) {
return HtmlHelpers.parseResponse(response, { originalIds: true });
return HtmlHelpers.parseResponse(response);
}).then(function(response) {
setLocalStorageParameter('currentTableUrl', url.href);
// reset table