Add listener to DOM element HTML update. Gecko, C#.Net, Java

I’m looking at the following site: www.example.com

I’m navigating to the site with a GeckoWebBrowser object and taking a snapshot of the HTML of the object every second. Then I navigate the DOM to get the table I want (div = ‘tableContainer’), get the InnerHTML of this element, and parse the table to a C#.Net Dataset. I can then create ‘Price’ objects and carry on processing the updates.

  • jQuery - How to convert a jQuery object to the kind of object returned w/ getElementById
  • How to return Element ID instead of [object HTMLDivElement] (Prototype.js)
  • How do I find the DOM node that is at a given (X,Y) position? (Hit test)
  • How do I pass a JavaScript class instance to DOM Event Listener?
  • Using JavaScript & jQuery in a single function (Nodes & Stuff)
  • How to customize the OpenERP 6.1 WebClient HTML DOM?
  • I would like to do this asynchronously: without the need to check the HTML of the element in a loop. If there’s no update, I don’t want to do anything. If there is an update, I want to collect the HTML (preferably just for a row/column/cell that has updated!!). How can I do either of the folllowin

    this.geckoWebBrowser1.Window.Scripter.AddEventListener("updateItem_inJavaScriptCode", new EventHandler<DOMJSONStringEventArgs>(OnMyExtensionEvent));
    

    or

    Skybound.Gecko.GeckoElement tableContainer = gwb.Document.GetElementById("tableContainer");
    tableContainer+= new GeckoDOMElementHTMLCHANGEDUPDATE(methodToCallWithDOMUpdate);`
    

    I’d appreciate any suggestions for this in Java or C#.Net or any pointers at all.

    Thanks.

  • Should I remove event handlers from element before removeChild?
  • Using jQuery to append inside a loop. There must be a better way
  • Succesive br Elements
  • Getting an error: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'
  • Can I use jquery within my custom Polymer elements?
  • How to trigger the HTML Select onClick event (activates select dropdown with options)
  • One Solution collect form web for “Add listener to DOM element HTML update. Gecko, C#.Net, Java”

    See: https://developer.mozilla.org/en/DOM/DOM_event_reference

    To my knowledge none of the events you require are part of the standard but if you’re only developing for a client you control there is no problem I suppose.

    This is of course the wrong to go about it. Why don’t you skip the HTML scraping step and fetch the data directly from whatever webservice the webpage plugs into?

    I see the DOM as only a UI model, it’s not a source of data. The source of data should be your webservices.