EEXCESS widgets are components like visualizations (Barchart, FacetScape, ...), which are typically included via an iframe. Therefore, they should be self-contained, i.e. include all necessary media, libraries, css-files, etc.
Communication with the EEXCESS-environment is enabled via the window.postMessage-API, with the available options described in the following.
For usage examples see the examples
folder and the according readme
file.
The data attribute in the transmitted messages adheres to the following pattern:
event:eexcess.<event>,
data:{<event details>}
Available events:
This event specifies, that a new query was triggered. The event details contain the profile, that is associated with this query
This event indicates the arrival of new results. The event details consist of two attributes: profile and results. Profile contains the user profile associated with the results and results contains the results retrieved.
Indicates that an item was rated in another component. The widget can then update the item's rating accordingly. The event details contain the uri of the item and score of the rating.
Used to indicate an error. The event details contain an error message as string.
Available events:
Indicates a new query. The event details contain the profile associated with that query.
Indicates that a module was opened. The event details contain the origin and the name of the module.
Indicates that a module was closed. The event details contain the origin, the name of the module and optionaly the duration
Indicates that a module wants to log data. The event details contain the origin and the data
Indicates that an item is opened. The event details contain the origin, the queryID of the original query and the documentBadge.
Indicates that an item is closed. The event details contain the origin, the queryID of the original query, the documentBadge and optionaly the duration.
Indicates that an item was cited in document as an image. The event details contain the origin, the queryID of the original query and the documentBadge.
Indicates that an item was cited in document as an text. The event details contain the origin, the queryID of the original query and the documentBadge.
Indicates that an item was cited in document as an hyperlink. The event details contain the origin, the queryID of the original query and the documentBadge.
Indicates that an item was rated. The event details contain the origin, the queryID, the documentBadge and the rating.
This event may be used by widgets upon initialization to obtain the current resultset (and associated profile). It triggers the parent window to send a message with a newResults event.