Module-documentation

version 1.0.0
module: event-dom
maintanance: Marco Asbreuk
home
all modules

DOM after-events

DOM-events do not have after-listeners by default. However, event-dom has.
You can type anything in the text-box and the event shows the new value. Notice that this example may examine the keypress event to monitor what key is pressed, it is not the right way to examine changes in the input-element. If you want to examine those, you need to use the valuechange-event.

Enter some text:

Code-example:

<body>
    <div id="input-container">
        <input id="example" />
    </div>
    <div id="container"></div>
</body>
<script src="itsabuild-min.js"></script>
<script>
    var container = document.getElement('#container');

    var showMsg = function(e) {
        container.setHTML(e.target.value);
    };

    ITSA.Event.after('keypress', showMsg, '#example');
</script>
API Docs