Pergunta

Before I try to run my application, I compile the C code with make and then remove the old version from the Extensions tab. I then add the newly saved copy to my extensions via "Load unpacked extension".

Then, since I have already cleared my cache and have the developer tools pane(which is checked to not save to cache) open, I find a PDF on the web and click on the link. It runs my extension as I can see the output in the console.

The problem is that any changes I make to the JavaScript code have not taken effect. I have gone so far as to erase my common.js and all other js files, and have it still run and output to the console. Any changes I make to the module in the C code does take effect though and can send different messages to the console at will.

Is there anything else I missed when reading the docs on how to get your code to take effect after you make changes?

Foi útil?

Solução 2

The problem I was facing was although my app had many different .js and .html files, they were not being used and the page being loaded was directly created by the nacl module. To get around this I used content scripts to inject the listener I needed into the page.

Outras dicas

I assume you have some content scripts injected into a page with the PDF link.

When an extension is reloaded/disabled/removed, my experience is that its injected content scripts survive until navigation. To fully refresh your code, you need to reload the extension AND the page you're testing.

Besides, you don't have to remove/add again the extension. "Reload" in developer mode should have the same effect, if the path did not change.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top