Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

getWindowForNode.js 458 B

3 anni fa
123456789101112131415161718192021
  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 getWindowForNode(node) {
  13. if (!node || !node.ownerDocument || !node.ownerDocument.defaultView) {
  14. return window;
  15. }
  16. return node.ownerDocument.defaultView;
  17. }
  18. module.exports = getWindowForNode;