Skip to content

yiminghe/simulate-dom-event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simulate-dom-event

simulate dom event across browser. it is only suitable for test purpose!

simulate-dom-event NPM downloads Dependency Status Bower version node version

exmaple

<script src='index.js'></script>
<div id='t'></div>
<script>
    var t = document.getElementById('t');
    t.addEventListener('click',function(e){
        alert(e.which);
    },false);
    window.simulateEvent(t,'click',{
        which:2
    });
</script>

About

simulate dom event across browser

Resources

Stars

Watchers

Forks

Packages

No packages published