@lvce-editor/virtual-dom 9.4.0 → 9.5.0

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -227,6 +227,15 @@ const getEventListenerArg = (param, event) => {
227
227
  case 'event.y':
228
228
  return event.y;
229
229
  default:
230
+ if (typeof param === 'string' && param.startsWith('event.currentTarget.')) {
231
+ const rest = param.slice('event.currentTarget.'.length);
232
+ const parts = rest.split('.');
233
+ let current = event.currentTarget;
234
+ for (const part of parts) {
235
+ current = current[part];
236
+ }
237
+ return current;
238
+ }
230
239
  if (typeof param === 'string' && param.startsWith('event.target.dataset')) {
231
240
  const rest = param.slice('event.target.dataset.'.length);
232
241
  return event.target.dataset[rest];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/virtual-dom.git"