Allow script event handlers to be called on non-target elements

But make sure the event originates from the same document as the original target