1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 01:02:31 +01:00
slate/lib/utils/find-dom-node.js

18 lines
240 B
JavaScript
Raw Normal View History

2016-07-11 18:36:45 -07:00
/**
* Find the DOM node for a `node`.
*
* @param {Node} node
* @return {Element} el
*/
function findDOMNode(node) {
return window.document.querySelector(`[data-key="${node.key}"]`)
}
/**
* Export.
*/
export default findDOMNode