-
introduction:
The newExposure is a tool for collecting exposure info in web page when user scroll the page.
It can be used by passing a request URL or a callback function, and can be setted as doing once action or more.
-
usage:
step 1: include the js file in your web page
with npm:
npm install --save newExposure
then:
import newExposure from 'newexposure'
or.
download in your local project manually
then:
<script src="js/newExposure.js"></script>
step 2: call the following method when you need to add exposure:
newExposure.pushListeningEle(ele, action, canRepeat)
eg.
newExposure.pushListeningEle(document.querySelector('#exp'), 'https://xxx.com/1.gif', false);
or.
newExposure.pushListeningEle(document.querySelector('#exp'), () => { console.log('showing...'); }, true);
-
Notifications
You must be signed in to change notification settings - Fork 2
eniumeng/newExposure
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
a tool for exposure info collecting
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published