Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

181
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda