其实我想修改替换词功能拼写检查器。Firefox-Addon:我如何覆盖UI功能?
我想(在我自己的Firefox扩展)的OnInit:
original_replaceWord = InlineSpellCheckerUI.replaceWord;
InlineSpellCheckerUI.replaceWord = function()
{
// things i would like to do (i.e. set the Cursor to another spot in the editor)
// call of the original function
return original_replaceWord.apply(this, arguments);
};
但是这似乎并没有工作,因为当我更换一个missspelled字这个函数没有被调用。
我如何找到正确的功能?我需要覆盖哪一个?
THX的任何建议
见InlineSpellCheckerUI源在http://mxr.mozilla.org/firefox/source/toolkit/content/inlineSpellCheckUI.js并设法找到你需要重写的功能。 – 2010-09-15 10:43:19
嗯,会试一试 – Thariama 2010-09-15 10:55:39