repo to share test sdk files Tasks focused on :-
- capture mouse events on a start sdk button click
- capture till stop sdk is clicked
- kept maximum capacity of events configurable say if there are 100 events captured next event will behave as FIFO.
- reset button to start fresh and delete previous events
Approach
- client html file to test the sdk
- SDK Js file acting as javascript module which is imported on client side
- SDK js file has functionality related to what events to capture and process it
Challenges
- In vanilla javascript scoping was little tricky to handle for event listeners function
- As i tried to use find for callback inside addeventlistener function but then the scope of "this" was getting screwed up and debugging took time there so switched to arrow functions
- other part was exposing sdk functions where had to use window function to make it global accessible
TO-DO
- writing test case