Module

utils/dom/global

@ckeditor/ckeditor5-utils/src/dom/global

module

Filtering

Constants

  • globalVar : GlobalType

    A helper (module) giving an access to the global DOM objects such as window and document. Accessing these objects using this helper allows easy and bulletproof testing, i.e. stubbing native properties:

    import { global } from 'ckeditor5/utils';
    
    // This stub will work for any code using global module.
    testUtils.sinon.stub( global, 'window', {
    	innerWidth: 10000
    } );
    
    console.log( global.window.innerWidth );
    

Interfaces