Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@fluentui/react-window-provider

microsoft970.1kMIT2.2.30TypeScript support: included

Utilities for providing and consuming the window/document objects even across portal/iframe/child-window boundaries.

readme

@fluentui/react-window-provider

A set of utilities for providing and consuming the window and document references in a contextual scope.

Why is this needed?

When rendering on the main browser window, many components need access to window or document for applying styling, listening for events, or measuring things. However it is possible to render to child windows and elements hosted in iframe elements.

In these cases, the target element is hosted in a different context, and thus have a different window reference. To aid in providing components with the correct instances of window or document, React context can be used to provide the tree of React components with the correct instance.

Usage

To consume the window or document object, call useWindow or useDocument respectively:

const Foo = () => {
  const win = useWindow();
  const doc = useDocument();

  return </>
}

To provide a new window other than the default, wrap your app in the WindowProvider to override the defaults contextually:

ReactDOM.render(
  <WindowProvider window={childWindow}>
    <...>
  </WindowProvider>,
  childWindowElement
);

changelog

Change Log - @fluentui/react-window-provider

This log was last generated on Fri, 21 Feb 2025 07:22:41 GMT and should not be manually modified.

2.2.29

Fri, 21 Feb 2025 07:22:41 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.24 (PR #33879 by beachball)

2.2.28

Thu, 01 Aug 2024 07:24:47 GMT Compare changes

Patches

2.2.27

Mon, 24 Jun 2024 07:33:22 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.23 (commit by beachball)

2.2.26

Thu, 06 Jun 2024 07:26:46 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.22 (commit by beachball)

2.2.25

Tue, 28 May 2024 07:28:20 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.21 (PR #31324 by beachball)

2.2.24

Fri, 24 May 2024 07:28:17 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.20 (commit by beachball)

2.2.23

Thu, 23 May 2024 07:28:51 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.19 (commit by beachball)

2.2.22

Mon, 20 May 2024 07:29:20 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.18 (commit by beachball)

2.2.21

Wed, 24 Apr 2024 07:27:48 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.17 (PR #31130 by beachball)

2.2.20

Fri, 12 Apr 2024 07:29:11 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.16 (PR #31022 by beachball)

2.2.19

Wed, 03 Apr 2024 07:29:31 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.15 (PR #30943 by beachball)

2.2.18

Wed, 10 Jan 2024 07:28:49 GMT Compare changes

Patches

2.2.17

Thu, 14 Dec 2023 07:30:10 GMT Compare changes

Patches

2.2.16

Sat, 28 Oct 2023 00:29:16 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.12 (commit by beachball)

2.2.15

Wed, 31 May 2023 07:38:40 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.11 (commit by beachball)
  • Bump @fluentui/test-utilities to v8.3.6 (commit by beachball)

2.2.14

Tue, 30 May 2023 07:36:09 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.10 (PR #27685 by beachball)
  • Bump @fluentui/test-utilities to v8.3.5 (PR #27685 by beachball)

2.2.13

Fri, 05 May 2023 18:13:59 GMT Compare changes

Patches

2.2.12

Tue, 02 May 2023 22:20:25 GMT Compare changes

Patches

  • Bump @fluentui/test-utilities to v8.3.3 (PR #27745 by beachball)

2.2.11

Tue, 02 May 2023 00:58:17 GMT Compare changes

Patches

2.2.10

Mon, 01 May 2023 07:39:54 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.7 (PR #27724 by beachball)
  • Bump @fluentui/test-utilities to v8.3.2 (PR #27724 by beachball)

2.2.9

Fri, 17 Mar 2023 08:15:56 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.6 (PR #27210 by beachball)
  • Bump @fluentui/test-utilities to v8.3.1 (PR #27210 by beachball)

2.2.8

Fri, 10 Mar 2023 07:38:25 GMT Compare changes

Patches

2.2.7

Wed, 01 Mar 2023 07:45:41 GMT Compare changes

Patches

  • Bump @fluentui/test-utilities to v8.3.0 (PR #26980 by beachball)

2.2.6

Fri, 03 Feb 2023 07:50:06 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.5 (PR #26569 by beachball)
  • Bump @fluentui/test-utilities to v8.2.6 (PR #26569 by beachball)

2.2.5

Tue, 10 Jan 2023 07:50:15 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.4 (PR #26260 by beachball)
  • Bump @fluentui/test-utilities to v8.2.5 (PR #26260 by beachball)

2.2.4

Wed, 09 Nov 2022 07:48:12 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.3 (PR #25564 by beachball)
  • Bump @fluentui/test-utilities to v8.2.4 (PR #25564 by beachball)

2.2.3

Thu, 20 Oct 2022 07:43:12 GMT Compare changes

Patches

2.2.2

Mon, 08 Aug 2022 07:39:33 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.2 (PR #24212 by beachball)
  • Bump @fluentui/test-utilities to v8.2.2 (PR #24212 by beachball)

2.2.1

Fri, 13 May 2022 07:45:35 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.2.1 (PR #22966 by beachball)
  • Bump @fluentui/test-utilities to v8.2.1 (PR #22966 by beachball)

2.2.0

Thu, 03 Mar 2022 07:24:24 GMT Compare changes

Minor changes

2.1.6

Wed, 15 Dec 2021 07:31:29 GMT Compare changes

Patches

  • Bump @fluentui/test-utilities to v8.1.0 (PR #20716 by beachball)

2.1.5

Thu, 25 Nov 2021 14:54:16 GMT Compare changes

Patches

  • Bump @fluentui/set-version to v8.1.5 (PR #20784 by beachball)
  • Bump @fluentui/test-utilities to v8.0.9 (PR #20784 by beachball)

2.1.4

Tue, 03 Aug 2021 07:39:30 GMT Compare changes

Patches

2.1.3

Fri, 09 Jul 2021 07:39:31 GMT Compare changes

Patches

2.1.2

Mon, 07 Jun 2021 07:38:15 GMT Compare changes

Patches

2.1.1

Thu, 20 May 2021 07:41:54 GMT Compare changes

Patches

2.1.0

Fri, 30 Apr 2021 07:42:23 GMT Compare changes

Minor changes

Patches

2.0.3

Fri, 23 Apr 2021 07:37:10 GMT Compare changes

Patches

2.0.2

Wed, 31 Mar 2021 00:53:43 GMT Compare changes

Patches

2.0.1

Fri, 26 Feb 2021 01:16:27 GMT Compare changes

Patches

2.0.0-beta.9

Mon, 22 Feb 2021 12:26:22 GMT Compare changes

Changes

2.0.0-beta.8

Thu, 18 Feb 2021 19:38:50 GMT Compare changes

Changes

  • Allow React 17 in peerDependencies. The library has not yet been fully validated with React 17, so please report any issues you find. (PR #17048 by elcraig@microsoft.com)

2.0.0-beta.7

Thu, 18 Feb 2021 12:27:34 GMT Compare changes

Changes

2.0.0-beta.6

Mon, 15 Feb 2021 12:22:00 GMT Compare changes

Changes

2.0.0-beta.5

Thu, 28 Jan 2021 12:25:56 GMT Compare changes

Changes

2.0.0-beta.4

Thu, 21 Jan 2021 12:36:12 GMT Compare changes

Changes

2.0.0-beta.0

Fri, 23 Oct 2020 03:26:15 GMT Compare changes

Changes

0.2.0

Wed, 19 Aug 2020 12:44:33 GMT

Patches