<html>
    <head>
        <script src="mraid.js"></script>
        <script language="javascript">
            function handleStateChanged(state) {
                alert('Current state from first function: ' + state);
            }
        
            function handleStateChanged2(state) {
                alert('Current state from second function: ' + state);
            }
        
            mraid.addEventListener("stateChange", handleStateChanged);
            mraid.addEventListener("stateChange", handleStateChanged2);
        </script>
    </head>
    <body align='center' style="background-color:silver;">
        Test MRAID removeEventListener<br/>
        <button type='button' onclick='mraid.expand();'>Expand</button>
        &nbsp;
        <button type='button' onclick='mraid.removeEventListener("stateChange"); alert("All listeners are removed for stateChange");'>Remove Listener</button>
    </body>
</html>