JavaScript Snippets

Auto Require

If you are using a class from sf-core or a method from contxjs, the IDE helps you to add missing require statements so that you don't have to add them manually.

Press ⌘⏎ (CTRL⏎ for Windows) or right click and press Auto Require from the context menu to trigger auto require.

Supported contxjs classes & methods

  • ThemeContext

  • createThemeContextBound

  • componentContextPatch

  • pushClassName

  • removeClassName

  • addChild

  • removeChild

  • removeChildren

  • addPageContextChild

Require Snippets

Require snippets for sf-core, contxjs and styler modules are readily available. Just type contx, sfcore or styler in order to list all available require statements.

Contxjs

In order to improve usability, some of the most used code snippets for contxjs are also provided. (Either directly or under the contx shortcut)

Available snippets

  • updateUserStyle

  • changeUserStyle

  • pushClassNames

  • removeClassName