Take a look at the HtmlWindow Class. You can get an instance of it from WebBrowser.Document.Window. If your js variables have global scope, they will belong to the Window object, and should be accessible from WebBrowser.Document.Window.DomWindow in C#.