dist/crocodoc.viewer.js
function() {
            if ($cachedPromise) {
                return $cachedPromise;
            }

            var $promise = ajax.fetch(this.getURL(), Crocodoc.ASSET_REQUEST_RETRIES);

            // @NOTE: promise.then() creates a new promise, which does not copy
            // custom properties, so we need to create a futher promise and add
            // an object with the abort method as the new target
            $cachedPromise = $promise.then(processStylesheetContent).promise({
                abort: function () {
                    $promise.abort();
                    $cachedPromise = null;
                }
            });
            return $cachedPromise;
        }
function() {
            if ($cachedPromise) {
                return $cachedPromise;
            }

            var $promise = ajax.fetch(this.getURL(), Crocodoc.ASSET_REQUEST_RETRIES);

            // @NOTE: promise.then() creates a new promise, which does not copy
            // custom properties, so we need to create a futher promise and add
            // an object with the abort method as the new target
            $cachedPromise = $promise.then(processStylesheetContent).promise({
                abort: function () {
                    $promise.abort();
                    $cachedPromise = null;
                }
            });
            return $cachedPromise;
        }
function ( ) { if ( $cachedPromise ) { return $cachedPromise ; } var $promise = ajax . fetch ( this . getURL ( ) , Crocodoc . ASSET_REQUEST_RETRIES ) ; // @NOTE: promise.then() creates a new promise, which does not copy // custom properties, so we need to create a futher promise and add // an object with the abort method as the new target $cachedPromise = $promise . then ( processStylesheetContent ) . promise ( { abort : function ( ) { $promise . abort ( ) ; $cachedPromise = null ; } } ) ; return $cachedPromise ; }
Retrieve the stylesheet.css asset from the server
@returns {$.Promise} A promise with an additional abort() method that will abort the XHR request.
Retrieve the stylesheet . css asset from the server