You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 3 година
1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. /**
  3. * Copyright (c) Facebook, Inc. and its affiliates.
  4. *
  5. * This source code is licensed under the MIT license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. *
  8. * @format
  9. *
  10. * @emails oncall+draft_js
  11. */
  12. function isHTMLElement(node) {
  13. if (!node || !node.ownerDocument) {
  14. return false;
  15. }
  16. if (!node.ownerDocument.defaultView) {
  17. return node instanceof HTMLElement;
  18. }
  19. if (node instanceof node.ownerDocument.defaultView.HTMLElement) {
  20. return true;
  21. }
  22. return false;
  23. }
  24. module.exports = isHTMLElement;