diff options
Diffstat (limited to 'src/utils/utils.js')
-rw-r--r-- | src/utils/utils.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/utils.js b/src/utils/utils.js index c6e6d3b..0d297ec 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -120,3 +120,7 @@ export function getOrigin(o, element) { // Return the origin as it is if it wasn't a string return [ox, oy] } + +const descriptiveElements = new Set(['desc', 'metadata', 'title']) +export const isDescriptive = (element) => + descriptiveElements.has(element.nodeName) |