javascript - JS - construct an event -


i'm reading code example , i'm wondering last line means:

function simulateclick() {  var event = new mouseevent('click', { 'view': window, 'bubbles': true, 'cancelable': true  });   var cb = document.getelementbyid('checkbox');   var canceled = !cb.dispatchevent(event); 

it means canceled assigned false if cb.dispatchevent(event) returns truthy (i.e. false, 0, '', null, undefined or nan) , vice-versa.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -