-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
Follow up to #28145 for @fluentui/react-components. We want to further restrict access to globals via a lint rule, disallowing direct access to things like ResizeObserver. After this change the pattern will be something like:
const { targetDocument } = useFluent();
const win = targetDocument.defaultView;
const ro = new win.ResizeObserver(...);Have you discussed this feature with our team
Additional context
This lint rule will better ensure objects created from globals are scoped to the correct window/document.
Validations
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Priority
Normal
Reactions are currently unavailable