Extending
you can extend the behaviour using some javascript events.
// you have now service and cookie state in the event.detail object available
document.getElementById('myElement').addEventListener('supiInitStart', (event) => {
alert("supi init done);
});
Available Events
Event: |
Description: |
---|---|
supiInitStart |
This event gets fired, when the EXT:supi init process starts |
supiInitEnd |
This event gets fired, when the EXT:supi init process ends |
injectScript |
This event gets fired, when the supi scripts (application/supi) are added to the web-page |
bannerHide |
This event gets fired, when the banner hides |
bannerShow |
This event gets fired, when the banner shows |
allowAll |
This event gets fired, when the user allows all cookies |
allowEssential |
This event gets fired, when the user allows only essential cookies |
allowSelected |
This event gets fired, when the user allows only selected cookies |
cookieDeleted |
This event gets fired, when the user disallows all cookies afterwards |
youTubeAllowedGlobal |
This event gets fired, when the user allows Youtube globally |
youTubeAllowed |
This event gets fired, when the user allows a Youtube Element |
customMapAllowed |
This event gets fired, when the user allows Google Maps |
simpleMapAllowed |
This event gets fired, when the user allows Google Maps @TODO: where is the difference between this and the customMap event? |
serviceCallback |
This event gets fired, when a callback service is called. (eg an json service is loaded) |
serviceCallbackError |
This event gets fired, when a callback service call failed. eg. a json service is not available |
serviceEmbeded |
This event gets fired, when a embed service is called. e.g. an iframe |