Property

CONTENT

static

Array making up the CSS content for Blockly.

Methods

inject

static

inject(hasCss, pathToMedia)

Inject the CSS into the DOM. This is preferable over using a regular CSS file since: a) It loads synchronously and doesn't force a redraw later. b) It speeds up loading by not blocking on a separate HTTP transfer. c) The CSS content may be made dynamic depending on init options.

Parameter

hasCss

boolean

If false, don't inject CSS (providing CSS becomes the document's responsibility).

pathToMedia

string

Path from page to the Blockly media directory.

register

static

register(cssArray)

Add some CSS to the blob that will be injected later. Allows optional components such as fields and the toolbox to store separate CSS. The provided array of CSS will be destroyed by this function.

Parameter

cssArray

Array of string

Array of CSS strings.

Value must not be null.

setCursor

static

setCursor(_cursor)

Set the cursor to be displayed when over something draggable. See See https://github.com/google/blockly/issues/981 for context.

Parameter

_cursor

any type

Enum.

Deprecated
April 2017.