This commit completes Phase 3 (Event System) and includes a thorough midpoint review that identified and fixed critical gaps from earlier phases. Major accomplishments: • Complete event system with addEventListener/removeEventListener API • Event dispatch system with preventDefault/stopPropagation support • Click event integration with w3m's existing mouse handling system • Enhanced document.write() from stub to functional implementation • Fixed critical anchor-DOM integration gap from Phase 2 • Comprehensive code review and stub elimination • Full DOM element extraction and JavaScript object conversion • Working noscript tag suppression when JavaScript is enabled Testing verified: • JavaScript execution and DOM manipulation working correctly • document.write() creates DOM elements and displays content properly • noscript content correctly hidden when JavaScript is enabled • Click events integrate properly with w3m's mouse system • No compilation errors or warnings (except minor unused variable) Phase status: Phases 1-3 now complete and fully functional. Remaining stubs are safe and won't cause unexpected behavior. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
805 B
HTML
27 lines
805 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Document.write vs Noscript Test</title>
|
|
</head>
|
|
<body>
|
|
<h1>JavaScript Detection Test</h1>
|
|
|
|
<p>This content should always appear.</p>
|
|
|
|
<script>
|
|
document.write('<p style="color: green;"><strong>SUCCESS: document.write() is working! JavaScript is enabled.</strong></p>');
|
|
document.write('<p>This paragraph was written by document.write()</p>');
|
|
</script>
|
|
|
|
<noscript>
|
|
<p style="color: red;"><strong>FAILURE: This should NOT appear if JavaScript is working</strong></p>
|
|
<p>JavaScript is disabled or not supported.</p>
|
|
</noscript>
|
|
|
|
<p>This content should also always appear.</p>
|
|
|
|
<script>
|
|
document.write('<div>Another document.write() test</div>');
|
|
</script>
|
|
</body>
|
|
</html> |