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 // Returns an object with `element` being an contextual fragment of the
// HTML in the response and `ifPrefix` being the prefix that was used to // HTML in the response and `ifPrefix` being the prefix that was used to
// "unique-ify" the ids of the received HTML. // "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. // to the `options` object.
function parseResponse(response, options) { function parseResponse(response, options) {
options = options || {}; options = options || {};
@ -15,7 +15,7 @@
return response.text().then(function (responseText) { return response.text().then(function (responseText) {
var docFrag = document.createRange().createContextualFragment(responseText); var docFrag = document.createRange().createContextualFragment(responseText);
var idPrefix; var idPrefix;
if (!options.originalIds) { if (!options.keepIds) {
idPrefix = _getIdPrefix(); idPrefix = _getIdPrefix();
_prefixIds(docFrag, idPrefix); _prefixIds(docFrag, idPrefix);
} }

View File

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