Skip to content

Commit

Permalink
Added a new binding option called "description.urlTarget", which stat…
Browse files Browse the repository at this point in the history
…es the target for the link URL (defaults to "_blank").
  • Loading branch information
William Troup committed May 7, 2024
1 parent de1b784 commit 56bfd53
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 33 deletions.
3 changes: 2 additions & 1 deletion dist/heat.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@
if (isDefinedString(bindingOptions.description.url)) {
var link = createElementWithHTML(container, "a", "label", bindingOptions.description.text);
link.href = bindingOptions.description.url;
link.target = "_blank";
link.target = bindingOptions.description.urlTarget;
} else {
createElementWithHTML(container, "span", "label", bindingOptions.description.text);
}
Expand Down Expand Up @@ -1518,6 +1518,7 @@
options.description = getDefaultObject(options.description, {});
options.description.text = getDefaultString(options.description.text, null);
options.description.url = getDefaultString(options.description.url, null);
options.description.urlTarget = getDefaultString(options.description.urlTarget, "_blank");
return options;
}
function buildAttributeOptionGuide(options) {
Expand Down
Loading

0 comments on commit 56bfd53

Please sign in to comment.