Skip to content

Commit a8e1ef1

Browse files
committed
fix: worker example
1 parent e09d1b8 commit a8e1ef1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

examples/worker.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,19 @@ self.onmessage = ( { data } ) => {
6565

6666
}
6767

68-
case 'pointerdown':
68+
case 'pointerdown': {
69+
70+
const { event } = payload;
71+
pseudoElement.dispatchEvent( { type: action, ...event } );
72+
break;
73+
74+
}
75+
6976
case 'pointermove':
7077
case 'pointerup': {
7178

7279
const { event } = payload;
73-
pseudoElement.dispatchEvent( { type: action, ...event } );
80+
pseudoElement.ownerDocument.dispatchEvent( { type: action, ...event } );
7481
break;
7582

7683
}

0 commit comments

Comments
 (0)