Question

I am trying to catch Visual Studio Extension events in browser javascript, DTE is available through window.external:

window.external.DTE.Events.SolutionEvents.Opened = ...

Access is ok up to "Events", but a SolutionEvents seems not to be found. I've checke the #imported tlb, _Events does have a get_SolutionEvents member.

DTE is the correct object (calling some methods through it works fine...)

I haven't done much yet with DTE, and I'm a complete javascript n00b. Any suggestions?


[update] The javascript runs in a web browser control hosted in a DTE tool window. The addin is written in C++/ATL.

Was it helpful?

Solution

As a quick answer, without asking why you need this, I would...

  • Through a C# handler catch the Opened event.
  • From there, I would call a Javascript method in your web page by using DOM.

Is your javascript loaded in a WebBrowser control? It would be easier to access DOM.

More info on DOM : http://msdn.microsoft.com/en-us/library/aa290341%28VS.71%29.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top