diff --git a/spec/manipulation/set-text.spec.js b/spec/manipulation/set-text.spec.js index 8734996..0f25458 100644 --- a/spec/manipulation/set-text.spec.js +++ b/spec/manipulation/set-text.spec.js @@ -17,6 +17,6 @@ describe("setText", () => { setText(subject, "text content"); expect(subject.querySelector(".before")).toBe(null); - expect(subject.innerText).toBe("text content"); + expect(subject.textContent).toBe("text content"); }); }); diff --git a/src/manipulation/set-text.js b/src/manipulation/set-text.js index cb65260..fc68a5a 100644 --- a/src/manipulation/set-text.js +++ b/src/manipulation/set-text.js @@ -1,7 +1,7 @@ /* @flow */ function setText(element: Element, text: string): void { - element.innerText = text; + element.textContent = text; } export default setText;