Say the webpage has a feature like:
function abc (){ return 'abc'; }
How do I execute and get the return value of this function from my extension? I tried this, no dice:
var s = getBrowser.contentWindow.abc();
Thanks in advance!
I think I solved my problem:
getBrowser().contentWindow.wrappedJSObject.funcFromPage();
I think that if you want to do this without serious security issues, you need to use XPCSafeJSObjectWrapper, but I have problems finding good documentation. https://developer.mozilla.org/en/XPConnect_wrappers has a bit. (Perhaps this happens automatically when doing the above, but I'm not sure.)
Source: https://habr.com/ru/post/1756354/More articles:Programmatically populate sample data for Django Image / File fields? - djangoАнимация с вкладкой TabHost - androidHow to check data format in PHP - datemodelform failed is_valid without setting form.errors - djangoDisplay HTML text in Spark TextArea - flexWhere to get the keep-alive specification on sockets in .NET? - .netreceive and set string contents in emacs-buffer programmatically - emacsWhy does the Android command use the demo version for delegates of the SmoothCanvas class? - javaYm4r cannot convert string to rails3 - ruby | fooobar.comSimple list comprehension - pythonAll Articles