@@ -28,7 +28,9 @@ const buttonPromiseRejection = document.getElementById('btn-promise-rejection');
2828
2929buttonPromiseRejection . addEventListener ( 'click' , function promiseRejectionSample ( ) {
3030 // Promise.reject('This is a sample rejected promise');
31- Promise . resolve ( ) . then ( realErrorSample ) . then ( ( ) => { } ) ;
31+ Promise . resolve ( )
32+ . then ( realErrorSample )
33+ . then ( ( ) => { } ) ;
3234} ) ;
3335
3436/**
@@ -77,7 +79,6 @@ buttonManualSending.addEventListener('click', () => {
7779 */
7880const buttonSetUser = document . getElementById ( 'btn-set-user' ) ;
7981const buttonClearUser = document . getElementById ( 'btn-clear-user' ) ;
80- const buttonGetUser = document . getElementById ( 'btn-get-user' ) ;
8182
8283buttonSetUser . addEventListener ( 'click' , ( ) => {
8384 const userId = document . getElementById ( 'userId' ) . value ;
@@ -102,17 +103,11 @@ buttonClearUser.addEventListener('click', () => {
102103 window . hawk . clearUser ( ) ;
103104} ) ;
104105
105- buttonGetUser . addEventListener ( 'click' , ( ) => {
106- const currentUser = window . hawk . getCurrentUser ( ) ;
107- alert ( 'Current user: ' + ( currentUser ? JSON . stringify ( currentUser , null , 2 ) : 'No user set' ) ) ;
108- } ) ;
109-
110106/**
111107 * Context Management
112108 */
113109const buttonSetContext = document . getElementById ( 'btn-set-context' ) ;
114110const buttonClearContext = document . getElementById ( 'btn-clear-context' ) ;
115- const buttonGetContext = document . getElementById ( 'btn-get-context' ) ;
116111
117112buttonSetContext . addEventListener ( 'click' , ( ) => {
118113 const contextKey = document . getElementById ( 'contextKey' ) . value ;
@@ -134,14 +129,6 @@ buttonClearContext.addEventListener('click', () => {
134129 window . hawk . clearContext ( ) ;
135130} ) ;
136131
137- buttonGetContext . addEventListener ( 'click' , ( ) => {
138- const currentContext = window . hawk . getCurrentContext ( ) ;
139- alert (
140- 'Current context: ' +
141- ( currentContext ? JSON . stringify ( currentContext , null , 2 ) : 'No context set' )
142- ) ;
143- } ) ;
144-
145132/**
146133 * Test without user
147134 */
0 commit comments