diff --git a/examples/worker.js b/examples/worker.js index 7fcc520..e83af1f 100644 --- a/examples/worker.js +++ b/examples/worker.js @@ -65,12 +65,19 @@ self.onmessage = ( { data } ) => { } - case 'pointerdown': + case 'pointerdown': { + + const { event } = payload; + pseudoElement.dispatchEvent( { type: action, ...event } ); + break; + + } + case 'pointermove': case 'pointerup': { const { event } = payload; - pseudoElement.dispatchEvent( { type: action, ...event } ); + pseudoElement.ownerDocument.dispatchEvent( { type: action, ...event } ); break; }