How to open a in a new tab/window

I have a button that when I press it i want it to navigate to a url (for this im using ["the](“the) url”) but how do I have it open in a new tab. Subsequent code runs after this navigation to “the url” but cannot run if “the url” is opened in the current tab.

You cannot .
You can only use target “_blank” with links.
If you need to open a new window without having a linked button or a linked text, you’ll have to do it using custom element and method.

Try set the to the new url full format ("http://…) and the = ‘_blank’.

This example should help you get started:

+keep in mind that if it is not a reaction for direct actions (click), some browsers (such as Firefox) will block it.