     ExitedTimer : () ->
         @broadcastEvent 'resumeRendering'
 
+    PageLoading : () ->
+        @browserLoading = true
+
+    PageLoaded : () ->
+        @browserLoading = false
+        cmds = serialize(@browser.window.document, @browser.resources)
+        events = @events.getSnapshot()
+        components = @browser.getSnapshot().components
+        for socket in @sockets
+            socket.emit 'loadFromSnapshot'
+                nodes      : cmds
+                events     : events
+                components : components
+
 module.exports = BrowserServer

        @nodes = new TaggedNodeCollection()
        @events = new EventProcessor(this)

        for own event, handler of DOMEventHandlers
            do (event, handler) =>
                @browser.on event, () =>

        # TODO:
        #   'log'
        #   bandwidth measuring and logging etc should go here, since browser is protocol agnostic.
    
    broadcastEvent : (name, params) ->
        for socket in @sockets
