iframe-event-bubble
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

node-iframe-event-bubble

说明

网址: https://gitee.com/linuxmail/node-iframe-event-bubble

iframe 内鼠标事件和键盘事件冒泡。

支持 ctrl, shift, alt, meta 冒泡

用法

import iframeEventBubble from "iframe-event-bubble";

// iframeElement 是 iframe 的 Element,不是 iframe 内的 document,第二个参数默认是 true
// true: 启用冒泡, false: 关闭冒泡
// 具体的事件见方法名,顾名思义即可

iframeEventBubble.bubbleClick(iframeElement, true/false);
iframeEventBubble.bubbleDblclick(iframeElement, true/false);
iframeEventBubble.bubbleMousedown(iframeElement, true/false);
iframeEventBubble.bubbleMouseup(iframeElement, true/false);
iframeEventBubble.bubbleMouseover(iframeElement, true/false);
iframeEventBubble.bubbleMouseout(iframeElement, true/false);
iframeEventBubble.bubbleMouseenter(iframeElement, true/false);
iframeEventBubble.bubbleMouseleave(iframeElement, true/false);
iframeEventBubble.bubbleKeydown(iframeElement, true/false);
iframeEventBubble.bubbleKeyup(iframeElement, true/false);
iframeEventBubble.bubbleKeypress(iframeElement, true/false);

Readme

Keywords

Package Sidebar

Install

npm i iframe-event-bubble

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

8.18 kB

Total Files

4

Last publish

Collaborators

  • linuxmail