@anuragsingh12/iframe-mouse-events
v1.0.3
Published
A lightweight TypeScript library for capturing and propagating mouse events from iframes to parent pages with automatic coordinate transformation.
Maintainers
Readme
Iframe Mouse Events Library
A lightweight TypeScript library for capturing and propagating mouse events from iframes to parent pages with automatic coordinate transformation.
Features
- 🖱️ Capture all mouse events (click, mousemove, mousedown, mouseup, etc.) from iframes
- 📐 Automatic coordinate transformation from iframe to parent page coordinates
- 🔒 Safe cross-origin iframe support using postMessage API
- 🎯 TypeScript support with full type definitions
- 🧹 Proper cleanup and memory management
- ⚡ Debouncing support for performance optimization
- 🎨 Simple and intuitive API
Installation
npm install iframe-mouse-events