aboutsummaryrefslogtreecommitdiff
path: root/src/shared/utils/dom.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-25 11:48:08 +0000
committerGitHub <noreply@github.com>2017-10-25 11:48:08 +0000
commitc6f380135d93ffecb192d30d7323888eb3d051f3 (patch)
tree1915cb4f3170fbf6c559b108a762b711177c62a3 /src/shared/utils/dom.js
parentccc81312a1d4d9a5cea7d7451c26ec25b2172aa8 (diff)
parenta4b86bf3a06c9f4e78bd5a714ae4673066a2f23f (diff)
Merge pull request #93 from ueokande/improve-for-certain-pages
Improve for aberration pages
Diffstat (limited to 'src/shared/utils/dom.js')
-rw-r--r--src/shared/utils/dom.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shared/utils/dom.js b/src/shared/utils/dom.js
new file mode 100644
index 0000000..c111ee7
--- /dev/null
+++ b/src/shared/utils/dom.js
@@ -0,0 +1,8 @@
+const isContentEditable = (element) => {
+ return element.hasAttribute('contenteditable') && (
+ element.getAttribute('contenteditable').toLowerCase() === 'true' ||
+ element.getAttribute('contenteditable').toLowerCase() === ''
+ );
+};
+
+export { isContentEditable };