Skip to content

Instantly share code, notes, and snippets.

@sueLan
Created March 5, 2020 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sueLan/a289829cc7d8003e38f68960a10b0003 to your computer and use it in GitHub Desktop.
Save sueLan/a289829cc7d8003e38f68960a10b0003 to your computer and use it in GitHub Desktop.
class ViewabilityHelper {
_config: ViewabilityConfig;
_hasInteracted: boolean = false;
/* A set of `timeoutID`, used for memory management */
_timers: Set<number> = new Set();
// Indexs of the viewable items
_viewableIndices: Array<number> = [];
// A map for viewable items
_viewableItems: Map<string, ViewToken> = new Map();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment