Main Site login Signup

Programmaticaly Fire DocumentReady Event After it's been fired.

in C# is there a way to fire the "DocumentReady" AFTER it's already been fired. to reprocess the page?

use case: I have a page where the data is display'd but should only be processed if its visible (!display:none) if its not visible, I want to process that change via JS (ExecuteScript) and then reprocess the page at the method level WITHOUT pulling all the information out into another method. (due to abstraction and inheritance as its set now it would be very difficult to pull up the code that needs to run. in other words the event is handled in the abstracted class and is passed to that class upon firing.)

I want to at the parent level (top) force the firing of that method for debug purposes.

I have an automated process that takes forever to get to a breaking point. and I want to set the site up for the failure and then fire the process to catch it breaking. currently all my processing is done on the Ready state of Loaded.

What I'm struggling with is getting the Awesomium.Core.DocumentReadyEventArgs instanciated in such a way that it would process in the same way.

I've tried to refresh/reload the page but due to the way it's programmed the application restarts from the beginning. (Single page webapp)

asked Apr 01, 2016 at 06:22 PM avatar image skyhoshi 0
more ▼
(comments are locked)
10|1100 characters needed characters left

1 answer: sort voted first

DocumentReady is fired within an asynchronous Javascript Execution Context (JEC). At any time after DocumentReady, you can execute a JavascriptExecutionContextMethod method in a JEC by calling CreateJavascriptExecutionContext.

Access to the current JavaScript environment through Global, is provided to your JavascriptExecutionContextMethod just as at DocumentReady.

The usage of the method is also demonstrated at the WPFJavascriptSample available with the SDK (see: Scenario 2).

answered Jun 15, 2016 at 03:01 AM avatar image Perikles C. Stephanidis ♦♦ 10.7k
more ▼
(comments are locked)
10|1100 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.