Skip to main content
Glama
mergeIframeClick.ts781 B
// Listener for messages from the iframe export const mergeIframeClick = (event: MessageEvent) => { // Simulate or merge the iframe message with a click event const simulatedMouseDownEvent = new MouseEvent('mousedown', { bubbles: true, cancelable: true, view: window, }); const simulatedClickEvent = new MouseEvent('click', { bubbles: true, cancelable: true, view: window, }); // Optionally attach additional properties from the iframe message Object.assign(simulatedClickEvent, { iframeData: event }); Object.assign(simulatedMouseDownEvent, { iframeData: event }); // Dispatch the simulated click event on the window or a specific element window.dispatchEvent(simulatedClickEvent); window.dispatchEvent(simulatedMouseDownEvent); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aymericzip/intlayer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server