Fix for delegation.

Delegation doesn't work properly. It fails to copy the "method" and "action" attributes from the form, since it looks for them on... the document.