 
     onremove: (el, opts) ->
         @fn.remove(el, opts)
-        el._browser_parent_done?.replace(null)
-        el._browser_done?.reset()
-        el._browser_manip?.cancel()
-        delete el._browser_parent_done
-        delete el._browser_replace
-        delete el._browser_insert
-        unless opts.soft
-            delete el._browser_manip
-            delete el._browser_done
+        el._browser?.destroy(opts)
+        delete el._browser unless opts.soft
 
     # ready callbacks
 
     insert_callback: (el) ->
         @fn.add(el.parent, el)
-        el._browser_ready?()
-        el._browser_ready = yes
-        el._browser_insert = yes
+        el._browser.ready?(el)
+        el._browser.ready = yes
+        el._browser.insert = yes
 
     parent_done_callback: (el) ->
         if el.parent is el.parent.builder
             bool = (not el.parent.parent? or
                        (el.parent.parent is el.parent.parent?.builder and # FIXME recursive?
-                        el.parent.parent?._browser_insert is true))
-            if bool and el.parent._browser_insert is true
-                @animation.push(el._browser_insert)
+                        el.parent.parent?._browser?.insert is true))
+            if bool and el.parent._browser?.insert is true
+                @animation.push(el._browser.insert)
             else
-                el._browser_insert?()
+                el._browser.insert?()
         else
-            @animation.push(el._browser_insert)
+            @animation.push(el._browser.insert)
 
     replace_callback: (oldtag, newtag) ->
         @fn.replace(oldtag, newtag)

defaultfn = {}
EVENTS.forEach (e) ->
    defaultfn[e] = -> throw new Error "no specific fn for #{e} defined" # dummy


class BrowserAdapter

  cancelable_and_retrivable_callbacks,
  removed } = require './util'
{ isArray } = Array

SHARED = ['parent_done', 'insert', 'replace', 'done']

EVENTS = [
    'add', 'end'
