Skip to content

Move runtime capability access away from Global window and navigator #241

Closed

Description

@jderochervlk

Parent: #237

Blocked by: #239

Summary

Refactor runtime capability modules so access is centered on owner modules instead of Global.window and Global.navigator.

Scope

  • Global
  • History
  • WebStorage
  • Performance
  • WebCrypto
  • ServiceWorker
  • WebWorkers
  • IndexedDB
  • Storage
  • VisualViewport
  • Permissions
  • Clipboard
  • CredentialManagement
  • ScreenWakeLock
  • WebLocks
  • related runtime tests

Files

  • src/Global.res
  • src/HistoryTypes.res
  • src/HistoryAPI/*.res
  • src/WebStorageTypes.res
  • src/WebStorageAPI/*.res
  • src/PerformanceTypes.res
  • src/PerformanceAPI/*.res
  • src/WebCryptoTypes.res
  • src/WebCryptoAPI/*.res
  • src/ServiceWorkerTypes.res
  • src/ServiceWorkerAPI/*.res
  • src/WebWorkersTypes.res
  • src/WebWorkersAPI/*.res
  • src/IndexedDBTypes.res
  • src/IndexedDBAPI/*.res
  • src/StorageTypes.res
  • src/StorageAPI/*.res
  • src/VisualViewportTypes.res
  • src/VisualViewport.res
  • src/PermissionsTypes.res
  • src/PermissionsAPI/*.res
  • src/ClipboardTypes.res
  • src/ClipboardAPI/*.res
  • src/CredentialManagementTypes.res
  • src/CredentialManagementAPI/*.res
  • src/ScreenWakeLockTypes.res
  • src/ScreenWakeLockAPI/*.res
  • src/WebLocksTypes.res
  • src/WebLocksAPI/*.res
  • tests/Global__test.res
  • tests/WebStorageAPI/*.res
  • tests/ServiceWorkerAPI/*.res
  • tests/WebWorkersAPI/*.res
  • tests/DOMAPI/Location__test.res

Checklist

  • Add type t to concrete runtime modules
  • Add owner-module entrypoints like History.current, Storage.local, Storage.session, Performance.current, Crypto.current, and ServiceWorkerContainer.current
  • Remove window and navigator from Global
  • Rewrite runtime tests to use owner-module entrypoints instead of Global.window / Global.navigator
  • Verify no remaining Global.window / Global.navigator usage in the edited runtime surface
  • Verify the diff adds no new include directives
  • Run npm run build
  • Run npm test

Acceptance Criteria

  • Global.window and Global.navigator are removed
  • owner-module entrypoints exist for the singleton capabilities touched in this slice
  • runtime tests stop depending on Global.window / Global.navigator
  • no new include directives are introduced
  • build and tests pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions