Add option flag to supress internal CSS.

This commit is contained in:
Neil Fraser
2015-01-22 13:31:55 -08:00
parent 2844da768f
commit 6e45f933e7
2 changed files with 11 additions and 4 deletions

View File

@@ -126,6 +126,10 @@ Blockly.parseOptions_ = function(options) {
if (hasSounds === undefined) {
hasSounds = true;
}
var hasCss = options['css'];
if (hasCss === undefined) {
hasCss = true;
}
var enableRealtime = !!options['realtime'];
var realtimeOptions = enableRealtime ? options['realtimeOptions'] : undefined;
@@ -145,6 +149,7 @@ Blockly.parseOptions_ = function(options) {
Blockly.hasScrollbars = hasScrollbars;
Blockly.hasTrashcan = hasTrashcan;
Blockly.hasSounds = hasSounds;
Blockly.hasCss = hasCss;
Blockly.languageTree = tree;
Blockly.enableRealtime = enableRealtime;
Blockly.realtimeOptions = realtimeOptions;
@@ -164,7 +169,9 @@ Blockly.createDom_ = function(container) {
goog.ui.Component.setDefaultRightToLeft(Blockly.RTL);
// Load CSS.
Blockly.Css.inject();
if (Blockly.hasCss) {
Blockly.Css.inject();
}
// Build the SVG DOM.
/*