This is not true for newer chrome apps.
Newer chrome apps having manifest_version: 2
requires the tabs be opened as:
chrome.browserAction.onClicked.addListener(function(activeTab)
{
var newURL = "http://www.youtube.com/watch?v=oHg5SJYRHA0";
chrome.tabs.create({ url: newURL });
});
More Related Contents:
- How can I get the URL of the current tab from a Google Chrome extension?
- How to stop CORB from blocking requests to data resources that respond with CORS headers?
- How to change chrome packaged app id Or Why do we need key field in the manifest.json?
- How can I open my extension’s pop-up with JavaScript?
- Since v38, Chrome extension cannot load from HTTP URLs anymore, workaround?
- chrome extension mv3 – Modularize service worker js file
- Disable developer mode extensions pop up in Chrome
- Start an external application from a Google Chrome Extension?
- Where does Chrome store extensions?
- Is it possible to run Google Chrome in headless mode with extensions?
- Using ECMAScript 6
- Content script matching top-level domains like all google.*
- How to download a CRX file from the Chrome web store for a given ID? [closed]
- Insert an image in chrome extension
- How to disable (gray out) page action for Chrome extension?
- Inject HTML into a page from a content script
- chrome.identity User Authentication in a Chrome Extension
- Can I modify outgoing request headers with a Chrome Extension?
- Is it possible to inject a javascript code that OVERRIDES the one existing in a DOM? (e.g default alert function)
- How to access the webpage DOM/HTML from an extension popup or background script?
- How do I import scripts into a service worker using Chrome extension manifest version 3?
- Disable chrome download multiple files confirmation
- Add contextmenu items to a Chrome extension’s browser action button
- Prevent chrome.notifications API from hiding my notification after a few seconds
- Chrome version 18+: How to allow inline scripting with a Content Security Policy?
- What does “http://*/*”, “https://*/*” and “” mean in the context of Chrome extension’s permissions
- CORS issue doesn’t occur when using POSTMAN
- How can I detect the current tab’s mime type in a Google Chrome extension?
- Passing message from background.js to popup.js
- Accessing `window`/DOM/HTML of the webpage from the extension