bkjxxxw/WebContent/static/echarts-2.2.7/doc/asset/js/esl/css.js

28 lines
771 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* ESL (Enterprise Standard Loader)
* Copyright 2013 Baidu Inc. All rights reserved.
*
* @file CSS Loader-Plugin
* @author errorrik(errorrik@gmail.com)
*/
// 构建环境暂不支持分析为了能合并该plugin到loader里
// 只能暂时使用具名id
define( 'css', {
load: function ( resourceId, req, load, config ) {
var link = document.createElement( 'link' );
link.setAttribute( 'rel', 'stylesheet' );
link.setAttribute( 'type', 'text/css' );
link.setAttribute( 'href', req.toUrl( resourceId ) );
var parent = document.getElementsByTagName( 'head' )[ 0 ]
|| document.body;
parent.appendChild( link );
parent = null;
link = null;
load( true );
}
} );