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

Google Chrome extension (Fire a event when extension starts)

  • Thread starter Thread starter m1alesis
  • Start date Start date
M

m1alesis

Guest
I want to fire a event just when my chrome extension starts. How do I achieve this? Is there a event listener that triggers when extension starts?

for example:-

Code:
chrome.runtime.onInstalled.addListener(function(){
        console.log('i will run once!');
});

Similar to this but not on installed but on start and it should only fire once during the extension's run time which is when it starts.

<p>I want to fire a event just when my chrome extension starts. How do I achieve this? Is there a event listener that triggers when extension starts?</p>

<p>for example:-</p>

<pre><code>chrome.runtime.onInstalled.addListener(function(){
console.log('i will run once!');
});
</code></pre>

<p>Similar to this but not on installed but on start and it should only fire once during the extension's run time which is when it starts.</p>
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top