選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

isElement.js.flow 426 B

12345678910111213141516171819
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @format
  8. * @flow strict
  9. * @emails oncall+draft_js
  10. */
  11. function isElement(node: ?Node): boolean {
  12. if (!node || !node.ownerDocument) {
  13. return false;
  14. }
  15. return node.nodeType === Node.ELEMENT_NODE;
  16. }
  17. module.exports = isElement;