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:
- queryTriggered
- new Results
- rating
- error
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:
- queryTriggered
- logging
- rating
- currentResults
Indicates a new query. The event details contain the profile associated with that query.
Indicates that some interaction should be logged. The event details contain an action attribute, which specifies the interaction and a details attribute, providing details on the interaction to be logged. Currently supported actions:
- resultOpened (details:)
Indicates the rating of an item. The event details contain the item's uri and corresponding score (integer).
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.