Closed basvandenberg closed 3 years ago
Instead of adding queryParams
as parameter of the DocViewer.create()
function, I enabled setting a function that will be used for fetching the query parameters.
// set root url of the help documents
DocViewer.setDocRoot('my/doc/root');
// set function for fetching query parameters
DocViewer.setQueryParamsFunc(myQueryParamsFunc);
If this function is set, it will be used to fetch query parameters, and (if there are any) they will be send to the server as part of the help document request.
Currently it is only possible to define a
docId
for showing a documentation page, in which case the page{docRoot}/{docId}.html
is loaded and displayed.Sending along (optional) query parameters would enable displaying different variants of the same help content (for example for different view contexts).
The queryParams should be optional, so if not defined/provided, it should be ignored.