Global

Members

Cookies :object

The core/js-cookie library object.

Type:
  • object
Source:

drupalSettings :object

Variable generated by Drupal with all the configuration created from PHP.

Type:
  • object
Source:

drupalTranslations :object

Variable generated by Drupal that holds all translated strings from PHP.

Content of this variable is automatically created by Drupal when using the Interface Translation module. It holds the translation of strings used on the page.

This variable is used to pass data from the backend to the frontend. Data contained in drupalSettings is used during behavior initialization.

Type:
  • object
Source:

Methods

_hashData() → {string}

Computes a hash of the data that can only be previewed by the server.

Source:
Returns:
Type
string

_loadPreview(callback)

Loads an media embed preview and runs a callback after insertion.

Note the absence of caching, that's because this uses a GET request (which is cacheable) and the server takes special care to make the responses privately cacheable (i.e. per session) in the browser.

Parameters:
Name Type Description
callback function

A callback function that will be called after the preview has loaded. Receives the widget instance.

Source:
See:
  • \Drupal\media\Controller\MediaFilterController::preview()

_previewNeedsServerSideUpdate() → {boolean}

Determines if the preview needs to be re-rendered by the server.

Source:
Returns:

Returns true if the data hashes differ.

Type
boolean

_setUpEditButton()

Injects HTML for edit button into the preview that was just loaded.

Source:

Type Definitions

jQuery

A jQuery object, typically the return value from a $(selector) call.

Holds an HTMLElement or a collection of HTMLElements.

Type:
  • object
Properties:
Name Type Default Description
length number 0

Number of elements contained in the jQuery object.

Source:

Events

columnschange

Triggers when weights columns are toggled.

Source:
Listeners of This Event:

columnschange

Triggers when weights columns are toggled.

Source:

dialogContentResize

Triggers when content inside a dialog changes.

Source:

drupalTabbingConstrained

Allow modules to respond to the constrain event.

Source:

drupalTabbingContextActivated

Allow modules to respond to the constrain event.

Source:

drupalTabbingContextDeactivated

Allow modules to respond to the constrain event.

Source:

drupalTabbingContextReleased

Allow modules to respond to the tabbingContext release event.

Source:

drupalViewportOffsetChange

Triggers when layout of the page changes.

This is used to position fixed element on the page during page resize and Toolbar toggling.

Source:

formFragmentLinkClickOrHashChange

Triggers when a click on a page fragment link or hash change is detected.

The event triggers when the fragment in the URL changes (a hash change) and when a link containing a fragment identifier is clicked. In case the hash changes due to a click this event will only be triggered once.

Source:

formUpdated

Triggers when a value in the form changed.

The event triggers when content is typed or pasted in a text field, before the change event triggers.

Source:
Listeners of This Event:

summaryUpdated

Triggers when form values inside a vertical tab changes.

This is used to update the summary in vertical tabs in order to know what are the important fields' values.

Source:
Listeners of This Event:

summaryUpdated

Triggers when form values inside a vertical tab changes.

This is used to update the summary in vertical tabs in order to know what are the important fields' values.

Source: