Exact origin
event.origin and event.source are verified. Messages that can carry tokens do not use targetOrigin="*".
The SharePoint runtime remains in the browser while application logic stays in .NET. The Bridge exchanges only semantic contracts and data, with verified origins and explicit routing.
The SharePoint page uses a single Bridge Web Part and can host one or more Wisej Hosts, optionally alongside a Microsoft ListView and the dedicated Command Set.
| Component | Name | Responsibility |
|---|---|---|
| Bridge singleton | GDG-SPFx-Bridge | SharePoint context, token, SPFx services, routing and cross-host distribution. |
| Host WebPart | GDG Wisej Host | Hosts the Wisej iframe and registers applicationId, instanceName and webPartInstanceId. |
| Libreria .NET | GDGSPFxBridge.dll | Session-scoped Public API consumed by Wisej code. |
| Consumer application | WisejSPFX / production app | UI, CRUD, local routing and business logic. |
| List integration | GDG Wisej ListView Command Set | ListView state, selection, List Actions and application routes. |
Browser/SPFx protocol v3 uses window.postMessage. Host communication is correlated and includes timeouts, deduplication and end-to-end completion.
A List Action, deep link, browser history event or application invocation produces a semantic route and its values.
Dispatch can target all Hosts, an applicationId, or a specific applicationId/instanceName pair.
SPFx does not know C# Pages, classes or methods. The Wisej router maps the semantic route name to application logic.
ApplicationRouteCompleted returns an outcome: Handled, NotHandled, Failed, TimedOut or HostUnavailable.
The user token is obtained by SPFx through AadTokenProvider and delivered to the Wisej session; no ClientSecret, password, certificates or second login are required in the production flow.
event.origin and event.source are verified. Messages that can carry tokens do not use targetOrigin="*".
The token remains server-side in the Wisej session and must not be written to browser storage, databases, application cookies or logs.
Remote routes are semantic and explicitly registered. External URLs, ambiguous routes and non-convertible inputs are rejected fail-closed.
Diagnostics.GetSnapshot() never exposes the AccessToken; technical logs use UTC ISO-8601 timestamps with milliseconds.
The Bridge distinguishes its public contract from what Microsoft ListView actually allows through supported SPFx APIs.
| Capability | Microsoft ListView source | Notes |
|---|---|---|
| readState | Supported and validated | Returns the live state of the original source. |
| refresh | Not exposed | The public ListViewAccessor does not expose a supported programmatic data refresh. |
| selectItems | Not exposed | No programmatic selection/focus is supported through the current public API. |
| DOM/private API | Not used | The core stays on public, supported APIs. |
After New/Edit/Delete, the List Web Part may remain visually stale until the user refreshes it manually. The demo avoids reloading the entire page so Hosts/ListView are not recreated and List Actions are not temporarily interrupted.