From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../test/mochitest/examples/dom-mutation.js | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 devtools/client/debugger/test/mochitest/examples/dom-mutation.js (limited to 'devtools/client/debugger/test/mochitest/examples/dom-mutation.js') diff --git a/devtools/client/debugger/test/mochitest/examples/dom-mutation.js b/devtools/client/debugger/test/mochitest/examples/dom-mutation.js new file mode 100644 index 0000000000..7de3ca72eb --- /dev/null +++ b/devtools/client/debugger/test/mochitest/examples/dom-mutation.js @@ -0,0 +1,26 @@ +function changeAttribute() { + const title = document.body.title === "Goodbye" ? "Hello" : "Goodbye"; + document.body.setAttribute("title", title); +} + +function changeStyleAttribute() { + document.body.style.color = "blue"; +} + +function addDivToBody() { + let div = document.createElement("div"); + div.id = "dynamic"; + document.body.appendChild(div); +} + +function removeDivInBody() { + document.body.querySelector("#dynamic").remove(); +} + +function changeAttributeInShadow() { + document.getElementById("host").shadowRoot.querySelector("div").classList.toggle("red"); +} + +document.getElementById("host").attachShadow({ mode: "open" }).innerHTML = `
`; + +//# sourceMappingURL=dom-mutation.js.map -- cgit v1.2.3