Ashley
Ashley

Reputation: 1489

DOM Changed Event Firefox Extension

So I have created a Firefox extension and it works great, however when I submitted it (although it was accepted) it came up with one security warning. It said setTimeout() was removed in an else clause.

So, is there a way to listen for any DOM change? (or even a specific element changing, I have an ID for both). However, divs do not have an onChange event so any ideas?

I don't mind if it's ANY change, doesn't have to be div-specific.

Upvotes: 3

Views: 789

Answers (2)

Ashley
Ashley

Reputation: 1489

It turns out adding an "onChange" event to a div works fine, although it might not be W3C valid it doesn't really matter as it's only a Firefox extension (plus it works!).

Upvotes: 0

c69
c69

Reputation: 21497

DOMSubtreeModified event sound like something you want to use. Keep in mind, that it is deprecated and after some time its support will probably be removed from browsers.

http://help.dottoro.com/ljrmcldi.php

Upvotes: 1

Related Questions