@lvce-editor/virtual-dom 3.5.0 → 3.6.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 +4 -2
  2. package/package.json +4 -7
package/dist/index.js CHANGED
@@ -399,11 +399,12 @@ const getOptions = fn => {
399
399
  return undefined;
400
400
  };
401
401
  const attachEvent = ($Node, eventMap, key, value, newEventMap) => {
402
+ const keyLower = key.toLowerCase();
402
403
  if (newEventMap && newEventMap[value]) {
403
404
  const fn = newEventMap[value];
404
405
  const options = getOptions(fn);
405
406
  // TODO support event listener options
406
- $Node.addEventListener(key, newEventMap[value], options);
407
+ $Node.addEventListener(keyLower, newEventMap[value], options);
407
408
  return;
408
409
  }
409
410
  const listener = eventMap[value];
@@ -413,7 +414,7 @@ const attachEvent = ($Node, eventMap, key, value, newEventMap) => {
413
414
  }
414
415
  const options = getEventListenerOptions(key, value);
415
416
  const wrapped = getWrappedListener(listener, eventMap.returnValue);
416
- $Node.addEventListener(key, wrapped, options);
417
+ $Node.addEventListener(keyLower, wrapped, options);
417
418
  };
418
419
 
419
420
  const setProp = ($Element, key, value, eventMap, newEventMap) => {
@@ -496,6 +497,7 @@ const setProp = ($Element, key, value, eventMap, newEventMap) => {
496
497
  case 'onPointerOut':
497
498
  case 'onPointerOver':
498
499
  case 'onScroll':
500
+ case 'onSelectionChange':
499
501
  case 'onWheel':
500
502
  const eventName = key.slice(2).toLowerCase();
501
503
  if (!eventMap || !value) {
package/package.json CHANGED
@@ -1,15 +1,12 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "3.5.0",
4
- "main": "dist/index.js",
5
- "type": "module",
6
- "keywords": [],
7
- "author": "",
8
- "license": "MIT",
9
- "description": "",
3
+ "version": "3.6.0",
10
4
  "repository": {
11
5
  "type": "git",
12
6
  "url": "git+https://github.com/lvce-editor/virtual-dom.git"
13
7
  },
8
+ "license": "MIT",
9
+ "type": "module",
10
+ "main": "dist/index.js",
14
11
  "types": "dist/index.d.ts"
15
12
  }