@joystick.js/test-canary 0.0.0-canary.24 → 0.0.0-canary.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var u=(o="",c="",t={})=>{const e=t?.document?.querySelector("button"),n=e?.querySelector(c),r=new Event(o);return console.log({dom:t,app:e,target:n}),n.dispatchEvent(r),!0};export{u as default};
|
package/package.json
CHANGED
|
@@ -2,6 +2,14 @@ export default (eventType = '', eventTarget = '', dom = {}) => {
|
|
|
2
2
|
const app = dom?.document?.querySelector('button');
|
|
3
3
|
const target = app?.querySelector(eventTarget);
|
|
4
4
|
const eventToDispatch = new Event(eventType);
|
|
5
|
+
|
|
6
|
+
console.log({
|
|
7
|
+
dom,
|
|
8
|
+
app,
|
|
9
|
+
target,
|
|
10
|
+
});
|
|
11
|
+
|
|
5
12
|
target.dispatchEvent(eventToDispatch);
|
|
13
|
+
|
|
6
14
|
return true;
|
|
7
15
|
};
|