Skip to content

Commit 3b42c56

Browse files
author
Nicholas Case
committed
add consentToolDisplayed notify event
1 parent 7f2f8c0 commit 3b42c56

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/lib/cmp.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@ export default class Cmp {
224224
* Trigger the consent tool UI to be shown
225225
*/
226226
showConsentTool: (_, callback = () => {}) => {
227+
const self = this;
227228
let _command;
228-
switch (this.config.layout) {
229+
switch (self.config.layout) {
229230
case 'footer':
230231
_command = 'toggleFooterConsentToolShowing';
231232
break;
@@ -236,8 +237,9 @@ export default class Cmp {
236237
_command = 'toggleConsentToolShowing';
237238
}
238239

239-
this.cmpShown = true;
240-
this.store[_command](true);
240+
self.cmpShown = true;
241+
self.store[_command](true);
242+
self.notify("consentToolDisplayed");
241243
callback(true);
242244
},
243245

0 commit comments

Comments
 (0)