![]() |
|
|
2개의 메시지 - 모두 축소 |

![]() |
Hello, I've written a scriptable firefox plugin that is able to receive nsCOMPtr<nsIServiceManager> servMan; NS_GET_IID(nsIObserverService), getter_AddRefs(observerService)); observerService->NotifyObservers(NULL, "Topic", 0); On the JS side, I will declare an observer that listens for "Topic". First of all, is this the recommended way to communicate from the Second, when I linked my plugin with xpcom.lib, it no longer gets Any suggestions would be greatly appreciated. Thanks! 메시지를 게시하려면 그룹에 가입해야 합니다.
메시지를 게시하려면 먼저 해당 그룹에 가입하셔야 합니다.
게시하기 전에 가입 설정 페이지에서 닉네임을 업데이트하십시오.
메시지를 게시할 수 있는 권한이 없습니다.
|
![]() |
On Aug 31, 2:12 pm, mcbraz...@gmail.com wrote:
> Hello, You can use methods such as JS_CallFunctionName to call java script > I've written a scriptable firefox plugin that is able to receive > nsCOMPtr<nsIServiceManager> servMan; > NS_GET_IID(nsIObserverService), > getter_AddRefs(observerService)); > observerService->NotifyObservers(NULL, "Topic", 0); > On the JS side, I will declare an observer that listens for "Topic". > First of all, is this the recommended way to communicate from the > Second, when I linked my plugin with xpcom.lib, it no longer gets > Any suggestions would be greatly appreciated. > Thanks! from C/C++ if this is what you are looking for. You basically get a hold of the JS Context and JS Object and then pass in the name of the function you want to call + the arguments that you want to pass into this function. Here are some examples.. http://developer.mozilla.org/en/docs/JS_CallFunctionName http://www.mozilla.org/js/spidermonkey/tutorial.html -Jens |