diff options
author | Doug Kearns <dougkearns@gmail.com> | 2009-09-25 20:59:58 +1000 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2009-09-25 20:59:58 +1000 |
commit | cd474c1d6a4bb57ef358c6e43689551ab7321c91 (patch) | |
tree | 84e7d59a1b740d5ac89958a49800f74a74632afb /common/content | |
parent | 252e1965c02aa2c2bec036739116f29b789afa76 (diff) | |
download | pentadactyl-cd474c1d6a4bb57ef358c6e43689551ab7321c91.tar.gz |
Call the Sanitize autocommand when clearing each private item.
--HG--
extra : transplant_source : a%AB%B2%02%28R%3EM%E5%AC%7C%CB%18%2A%AA9%FEbt%09
Diffstat (limited to 'common/content')
-rw-r--r-- | common/content/sanitizer.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/content/sanitizer.js b/common/content/sanitizer.js index 4db4f33d..6ac3ad21 100644 --- a/common/content/sanitizer.js +++ b/common/content/sanitizer.js @@ -253,6 +253,21 @@ function Sanitizer() //{{{ } }); + // call Sanitize autocommand + for (let [name, item] in Iterator(self.items)) + { + let arg = prefToArg(name); + + if (item.clear) + { + let func = item.clear; + item.clear = function () { + autocommands.trigger("Sanitize", { name: arg }) + func.call(item); + } + } + } + self.getClearRange = Sanitizer.getClearRange; // Largely ripped from from browser/base/content/sanitize.js so we can override |