OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Not allowed to launch '<URL>' because a user gesture is required

  • Thread starter Thread starter Tom Red
  • Start date Start date
T

Tom Red

Guest
I have problem part code. I am developing an extension. I am trying to open link using my app.

Code:
var tab;
const context = chrome || browser;

if (tab.url.includes("youtube.com/watch?")) {
      context.tabs.update(tab.id, { url: "nameOfMyProgram:" + tab.url }); // Not allowed to launch 
      //'<URL>' because a user gesture is required. 
}

The problem occurs in the opera browser The first time it hits the web page, it works correctly. On subsequent clicks, an error "Not allowed to launch '' because a user gesture is required." This works correctly in the chrome browser. How can I solve this problem?

I have permission "tabs" in my manifest

<p>I have problem part code.
I am developing an extension.
I am trying to open link using my app.</p>
<pre><code>var tab;
const context = chrome || browser;

if (tab.url.includes("youtube.com/watch?")) {
context.tabs.update(tab.id, { url: "nameOfMyProgram:" + tab.url }); // Not allowed to launch
//'<URL>' because a user gesture is required.
}
</code></pre>
<p>The problem occurs in the opera browser
The first time it hits the web page, it works correctly.
On subsequent clicks, an error "Not allowed to launch '' because a user gesture is required."
This works correctly in the chrome browser. How can I solve this problem?</p>
<p>I have permission "tabs" in my manifest</p>
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top