| <!DOCTYPE hml> |
| <html> |
| <body> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| description("Tests that the 2 first parameters of addEventListener() / removeEventListener() are mandatory."); |
| |
| shouldThrow("addEventListener()"); |
| shouldThrow("addEventListener('load')"); |
| shouldThrow("removeEventListener()"); |
| shouldThrow("removeEventListener('load')"); |
| |
| // The second parameter should be nullable (no exception thrown). |
| shouldNotThrow("addEventListener('load', null)"); |
| shouldNotThrow("addEventListener('load', undefined)"); |
| shouldNotThrow("removeEventListener('load', null)"); |
| shouldNotThrow("removeEventListener('load', undefined)"); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |