Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 393 Bytes

window.md

File metadata and controls

22 lines (17 loc) · 393 Bytes

Window

close()

maximize()

minimize()

setTimeout(fn: () => void, timeout: number)

Create a timer that belongs to the window. Timer will be automatically destroyed(cleared) when closed.

const window = useWindow();

window.setTimeout(() => {
  window.close();
}, 1000);
window.setTimeout(() => {
  // This won't be executed!
  window.maximize();
}, 5000);