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

185
Views
why the google chrome extension option page did not show alert message

I am developing a google chrome extension right now, In the google chrome extension UI page, I define a link like this in template.html:

<a href="#" @click="clearToken()">click</a>

when click the link in the UI, invoke the background method clearToken, this is the background code looks like:

import chromeCall from 'chrome-call';
import getOptions from '../../public/default-options';
import template from './template.html';

export default {
  template ,
  data : ()=> ({
    clearSuccess : false,
    options : {
      excludeDomains: []
    } ,
    showAdd : false ,
    tmpDomain : '',
    reddwarfUserName: '',
    reddwarfPassword: '',
    showYDApi : false,
    addYouDaoAPI : {
      apiKey : '',
      keyFrom : ''
    }
  }) ,
  methods : {
    clearToken() {
     alert("click");
  }
}})}

but when I click the link in the UI, did not alert any message, I am sure the background method was triggered because when I write a clear local storage key logic in the method and it works. why the background method did not show the alert information? what should I do to debug the google chrome extension option page? I also tried to add debugger code in the background method, still did not trigger the breakpoint. I already opened the background page of the extension(but I could not open the popup page and option page in the same time). My google chrome version is Version 97.0.4692.71 (Official Build) (arm64).

about 4 years ago · Juan Pablo Isaza
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!