triggerDocumentClick function
Dispatches a click
event to the specified target
.
Verifies that the target
element is not a detached node.
Implementation
void triggerDocumentClick(Element target) {
triggerDocumentMouseEvent(target, 'click');
}