8
0

isrange.js 428 B

123456789101112131415161718
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /**
  6. * @module utils/dom/isrange
  7. */
  8. /**
  9. * Checks if the object is a native DOM Range.
  10. *
  11. * @param {*} obj
  12. * @returns {Boolean}
  13. */
  14. export default function isRange( obj ) {
  15. return Object.prototype.toString.apply( obj ) == '[object Range]';
  16. }