Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

871
Views
Open a chrome newtab with url chrome://newtab/

The first line works fine, but the second one doesn't work; why?

// Works
window.open('https://google.com/', '_blank'); 

// Doesn't work, why?
window.open('chrome://newtab/', '_blank'); 
about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

Due to security issues, sadly, you cannot do this in chrome. The best you can do would be to point to google.com if you want the user to have a search bar or something like that. For example, something like this would work:

<a href="https://google.com" target="_blank">Search Anything</a>
about 4 years ago · Juan Pablo Isaza Report

0

Unfortunately, utilizing accessible browser APIs, you won't be able to perform what you desire. window.open has the following syntax: window.open(URL, name, specs, replace). The first two specify how this new "window" will be opened. The address of the window's destination. These can be left blank, but it will open a window titled about:blank. The name specifies how the window should be opened, is the second portion (tab, window, etc.).

This URL can't load local resources; therefore, "chrome:/newtab" won't function. If you try to use a period in your URL, it will open a new window with the last website you visited. If you try to start a new window with a slash in the URL, it will open with the base path of the new window. I tested invalid URLs (random strings and characters), and they merely opened a new window with your current URL and appended anything you wrote.

Sources for Reference

https://developer.mozilla.org/en-US/docs/Web/API/Window/open

about 4 years ago · Juan Pablo Isaza Report

0

You can just try this out:

const newtab = () =>‌ window.open('dummy url', '_blank');

I think that would work for you ;)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!