Ok, so I trying to achieve a console-like behavior and I need to pause the execution until some event is dispatched, what I exactly need is this:
var evt = $("element").waitForKeyDown();
这一假设功能应当暂停执行,直到用户发布关于“要素”要素的钥匙,该要素被假定为一个文本领域。 然后,当用户对文本领域的任何关键人物施加压力时,就应继续执行,并且应当载有与该事件有关的信息。
Is this possible to achieve in javascript? or a close behavior that works like.