/// /** * --- * category: utilities/react * --- * A decorator or higher order component that provides methods * for cross-origin communication (between iframes/windows). * * see https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage * @module windowMessageListener * @param {Function} messageHandler a handler for messages receieved by the component * @param {Function} validSource an optional function that would restrict message handling to a specified source. * @returns {Function} a function that decorates a React component with the behavior */ declare const windowMessageListener: (...args: unknown[]) => (ComposedComponent: import("react").ComponentClass) => any; /** * Return the origin of the owner window of the DOM element * * see https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage * * @param {DOMElement} node * @returns {String} the origin */ declare function origin(node: Element): string; export default windowMessageListener; export { origin, windowMessageListener }; //# sourceMappingURL=windowMessageListener.d.ts.map