packages/cdp-lazyload/src/scripts/cdp.lazyload.js
function _getScriptElements($typeLazy) {
        var scripts;
        var src = $typeLazy.attr("src");
        if (!src) {
            src = $typeLazy.data("src");
        }
        if ("js" === _getExtension(src).toLowerCase()) {
            return $typeLazy;
        } else {
            if (requirejs && typeof requirejs.toUrl === "function") {
                src = requirejs.toUrl(src);
            }
            $.ajax({
                url: src,
                method: "GET",
                async: false,
                dataType: "html",
                success: function (data){
                    scripts = data;
                },
                error: function (data, status) {
                    console.error(TAG + "lazyLoad() ajax request failed. [status: " + status + "][src: " + src + "]");
                }
            });
            return $(scripts).find("script");
        }
    }
function _getScriptElements($typeLazy) {
        var scripts;
        var src = $typeLazy.attr("src");
        if (!src) {
            src = $typeLazy.data("src");
        }
        if ("js" === _getExtension(src).toLowerCase()) {
            return $typeLazy;
        } else {
            if (requirejs && typeof requirejs.toUrl === "function") {
                src = requirejs.toUrl(src);
            }
            $.ajax({
                url: src,
                method: "GET",
                async: false,
                dataType: "html",
                success: function (data){
                    scripts = data;
                },
                error: function (data, status) {
                    console.error(TAG + "lazyLoad() ajax request failed. [status: " + status + "][src: " + src + "]");
                }
            });
            return $(scripts).find("script");
        }
    }
function _getScriptElements ( $typeLazy ) { var scripts ; var src = $typeLazy . attr ( "src" ) ; if ( ! src ) { src = $typeLazy . data ( "src" ) ; } if ( "js" === _getExtension ( src ) . toLowerCase ( ) ) { return $typeLazy ; } else { if ( requirejs && typeof requirejs . toUrl === "function" ) { src = requirejs . toUrl ( src ) ; } $ . ajax ( { url : src , method : "GET" , async : false , dataType : "html" , success : function ( data ) { scripts = data ; } , error : function ( data , status ) { console . error ( TAG + "lazyLoad() ajax request failed. [status: " + status + "][src: " + src + "]" ) ; } } ) ; return $ ( scripts ) . find ( "script" ) ; } }
\~english
Get script elements.

@private
@param  file {jQuery} [in] type lazy elements
@return {jQuery} script elements

\~japanese
script element の取得

@private
@param  file {jQuery} [in] type lazy elements
@return {jQuery} script elements
\ ~english Get script elements .