Something went wrong. Try again.
we (web engine): Experimental web browser project to understand the limits of Claude
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930<!DOCTYPE html><meta charset="utf-8"><title>Node.textContent</title><script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script><div id="log"></div><script>test(function() { var el = document.createElement("div"); el.textContent = "hello world"; assert_equals(el.textContent, "hello world");}, "setting textContent on element works");
test(function() { var el = document.createElement("div"); el.textContent = ""; assert_equals(el.textContent, "");}, "setting textContent to empty string works");
test(function() { var el = document.createElement("div"); var child = document.createElement("span"); child.textContent = "inner"; el.appendChild(child); el.textContent = "replaced"; assert_equals(el.textContent, "replaced"); assert_true(el.hasChildNodes());}, "setting textContent replaces all children");</script>