Skip to content

Commit

Permalink
Use textContent instead of non standard innerText
Browse files Browse the repository at this point in the history
  • Loading branch information
demiazz committed May 31, 2017
1 parent 5675782 commit 7f9bf32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/manipulation/set-text.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
});
2 changes: 1 addition & 1 deletion src/manipulation/set-text.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */

function setText(element: Element, text: string): void {
element.innerText = text;
element.textContent = text;
}

export default setText;

0 comments on commit 7f9bf32

Please sign in to comment.