Exemplo n.º 1
0
        public static void OnURLChange(HTML_URLChanged_t pParam)
        {
            try
            {
                string invocation = pParam.pchURL.After('#');

                if (!invocation.StartsWith("invoke!"))
                {
                    return;
                }

                string guid_str = invocation.Split('!')[1];
                int    guid     = int.Parse(guid_str.Substring("guid".Length));

                if (guid <= InvocationGuid)
                {
                    return;
                }
                InvocationGuid = guid;

                invocation = invocation.After('!').After('!');

                //Console.WriteLine($"Invocating {invocation.Abbreviated()}");
                Game.GameClass.Game.ExecuteInvocation(invocation);
            }
            catch (Exception e)
            {
                Console.WriteLine($"Error executing function in {pParam.pchURL}.");
            }
        }
 void OnHTML_URLChanged(HTML_URLChanged_t pCallback)
 {
     Debug.Log("[" + HTML_URLChanged_t.k_iCallback + " - HTML_URLChanged] - " + pCallback.unBrowserHandle + " -- " + pCallback.pchURL + " -- " + pCallback.pchPostData + " -- " + pCallback.bIsRedirect + " -- " + pCallback.pchPageTitle + " -- " + pCallback.bNewNavigation);
 }