I am trying to create an addon with a new add-on previewer (https://builder.addons.mozilla.org/) and I need a function to run about once every 10 minutes. I tried both setInterval and setTimeout, but they both return the following error:
error: An exception occurred. Traceback (most recent call last): File "resource://jid0-31njasqk3btmpa6paroepuybjn4-myaddon-lib/main.js", line 41, in setTimeout(function() { timedCount(); }, 10000); ReferenceError: setTimeout is not defined
(with replacing setTimeout with setInterval when I tried it. The network function setTimeout worked fine on the same web page I built. I just had a function call for an infinite loop (that sounds silly, it should be a loop time, but it was in the textbook;) But now I can not get through this error in my addon.
Also, if you can help me parse the local or remote page in this addon (preferably remotely, but I can get it to parse the created django page on localhost), or even better, just tell me how to use python;), which would be great.
Thanks!
source share