utils.js 608 B

123456789101112131415161718
  1. /**
  2. * DevExtreme (integration/knockout/utils.js)
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
  8. */
  9. "use strict";
  10. var ko = require("knockout");
  11. var getClosestNodeWithContext = function getClosestNodeWithContext(node) {
  12. var context = ko.contextFor(node);
  13. if (!context && node.parentNode) {
  14. return getClosestNodeWithContext(node.parentNode)
  15. }
  16. return node
  17. };
  18. module.exports.getClosestNodeWithContext = getClosestNodeWithContext;