Area of Issue
Issue Description:
The sample code for discovering proxy candidates here:
https://fdc3.finos.org/docs/next/api/specs/webConnectionProtocol#12-desktop-agent-discovery
Is not complete. It does not add parents of the opener. These parent could also have openers of course. We actually need a recursive function I think. Something like:
export function discoverProxyCandidates(windowRef?: WindowProxy): WindowProxy[] {
const candidates: WindowProxy[] = [];
return addCandidates(windowRef ?? window, candidates);
}
function addCandidates(window: WindowProxy, candidates: WindowProxy[]): WindowProxy[] {
candidates.push(window);
if (window.opener != null) {
addCandidates(window.opener, candidates);
}
if (window.parent != window) {
addCandidates(window.parent, candidates);
}
return candidates;
}
Area of Issue
Issue Description:
The sample code for discovering proxy candidates here:
https://fdc3.finos.org/docs/next/api/specs/webConnectionProtocol#12-desktop-agent-discovery
Is not complete. It does not add parents of the opener. These parent could also have openers of course. We actually need a recursive function I think. Something like: