mirror of
https://github.com/google/blockly.git
synced 2026-01-06 16:40:07 +01:00
fix!: Update deprecations for the new release. (#6470)
* chore: bump early deprecations to v10 * fixup * fixup * chore: remove deprecated properties * chore: add missing @deprecated tags * chore: format * chore: format * chore: fix import
This commit is contained in:
15
core/css.ts
15
core/css.ts
@@ -12,8 +12,6 @@
|
||||
import * as goog from '../closure/goog/goog.js';
|
||||
goog.declareModuleId('Blockly.Css');
|
||||
|
||||
import * as deprecation from './utils/deprecation.js';
|
||||
|
||||
|
||||
/** Has CSS already been injected? */
|
||||
let injected = false;
|
||||
@@ -25,20 +23,11 @@ let injected = false;
|
||||
* @param cssContent Multiline CSS string or an array of single lines of CSS.
|
||||
* @alias Blockly.Css.register
|
||||
*/
|
||||
export function register(cssContent: string|string[]) {
|
||||
export function register(cssContent: string) {
|
||||
if (injected) {
|
||||
throw Error('CSS already injected');
|
||||
}
|
||||
|
||||
if (Array.isArray(cssContent)) {
|
||||
deprecation.warn(
|
||||
'Registering CSS by passing an array of strings', 'September 2021',
|
||||
'September 2022', 'css.register passing a multiline string');
|
||||
content += '\n' + cssContent.join('\n');
|
||||
} else {
|
||||
// Add new cssContent in the global content.
|
||||
content += '\n' + cssContent;
|
||||
}
|
||||
content += '\n' + cssContent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user