版博士V2.0程序
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

IFrameCrossOriginWindow.d.ts 1.0 KiB

1234567891011121314151617181920212223242526272829
  1. import EventTarget from '../../event/EventTarget';
  2. import IWindow from '../../window/IWindow';
  3. import Location from '../../location/Location';
  4. /**
  5. * Browser window with limited access due to CORS restrictions in iframes.
  6. */
  7. export default class IFrameCrossOriginWindow extends EventTarget {
  8. readonly self: this;
  9. readonly window: this;
  10. readonly parent: IWindow;
  11. readonly top: IWindow;
  12. readonly location: Location;
  13. private _targetWindow;
  14. /**
  15. * Constructor.
  16. *
  17. * @param parent Parent window.
  18. * @param target Target window.
  19. */
  20. constructor(parent: IWindow, target: IWindow);
  21. /**
  22. * Safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.
  23. *
  24. * @param message Message.
  25. * @param [targetOrigin=*] Target origin.
  26. * @param transfer Transfer. Not implemented.
  27. */
  28. postMessage(message: unknown, targetOrigin?: string, transfer?: unknown[]): void;
  29. }