Hello. I am programming a desktop application in Delphi. So far I've been using TWebBrowser component for 1) loading a page completely and 2) THEN sending Javascript to it (Webbrowser.Navigate('javascript: join_game()')
But I don't really like that, because I have to wait for the TWebBrowser to completely load the page. I don't use it for anything else. The routine looks like this:
repeat begin
SourceCode:=HTTPGetText(PAGE_URL);
// now parse the code and depending on the result either call js: join_game() or js: leave_game()
end;
Whenever either of those functions is called, the server adds or removes me, as the one currently logged on (automatically, saved in cookies) to/from a lobby.
What I am asking is, is it somehow possible to call the JS script without loading the page, something like writing this to an address bar: http://www.pagewithjs.com/javascript:function()