question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specify target in href links

See original GitHub issue

It would be useful to be able to specify the target in href links within vega plots. One example is plots within the Jupyter notebook, for which a normal <a href=""> changes the window and can lead to a loss of state.

It would be nice to let this percolate up to Vega-Lite as well 😄

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
domoritzcommented, Oct 31, 2018

I don’t have the time to make a full example right now but I think you can just pass a dictionary with {'target': '_blank'} to the Vega-Embed loader option property.

1reaction
jheercommented, Mar 5, 2018

Added via updates to vega-view and vega-loader. Once the next Vega version is released, the following will set the default link target within the URL sanitization and loading system:

new vega.View(runtimeSpec, {
  loader: vega.loader({target: '_blank'})
});

Perhaps vega-embed should also be updated to expose target as a parameter?

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML a target Attribute - W3Schools
Definition and Usage. The target attribute specifies where to open the linked document. Browser Support. Attribute.
Read more >
How to change the target of a link in HTML? - Tutorialspoint
We use the target attribute of the <a>…</a> tag, to change the target value of the link. The target attribute can be used...
Read more >
HTML | <link> target Attribute - GeeksforGeeks
The HTML <link> target Attribute is used to specify the window or a frame where the linked document is loaded. It is not...
Read more >
target=blank - CSS-Tricks
target ="_blank" is a special keyword that will open links in a new tab every time. · target="blank" will open the first-clicked link...
Read more >
How to Open a Link in a New Tab – HTML target blank ...
You can use the target="_blank" attribute if you want your users to click on a link that opens up a new browser tab....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found