Allow insert before dom element

'before' argument can now either be a query selector or a dom element.
This is handy if you have the dom element to hand and woud find it
awkward to derive a query selector from it.