Commit 1ff53058 authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[fix] Enable views to return suggested resources upon rendering

parent f293b2b85de5
......@@ -32,6 +32,10 @@ export interface ViewRendering {
* The identifier of the selected view
*/
viewId: string;
/**
* The URI of resources that could be of interest to the view that produced this rendering
*/
suggestedResources: string[];
}
/**
......
......@@ -63,7 +63,7 @@ export interface ViewImplementation {
renderer: ViewRenderer,
context: RenderingContext,
target: string
): HTMLElement;
): ViewRendering;
}
/**
......@@ -291,10 +291,9 @@ class ViewRendererImpl implements ViewRenderer {
// cannot resolve a view ...
return null;
}
return {
dom: view.render(this, context, target),
viewId: view.descriptor.identifier
};
let result = view.render(this, context, target);
result.viewId = view.descriptor.identifier; // ensure view id is correct
return result;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment