Skip to content

Export v4 Util class to make it usable in custom JS functions #18413

Closed

Description

@wasinger

For custom transition effects I currently use the transition helper functions $.fn.emulateTransitionEnd and $.support.transition from Bootstrap 3.

While porting my code to Bootstrap 4 I noted that while $.fn.emulateTransitionEnd is still available and works as expected, the $.support.transition function is no longer availabe because it got replaced by Util.supportsTransitionEnd(). Unfortunately, the Util class is available within a Closure only so I cannot access it from my code.

So I ask to export the Util class to the global or jQuery namespace (e.g. as $.BootstrapUtil) to make it available for use in custom JS code.

This is somehow related to #18136 which complains about the Util class being exported as Util in the global namespace, which is not true for the default build - it is not exported at all, but IMHO should be exported under some name other than plain "Util".

Activity

  1. added
    jsJavaScript or TypeScript sources and plugins
    v4v4, the frozen docs on gh-pages
    on Dec 3, 2015
  2. Johann-S commented on Aug 31, 2017

    @Johann-S
    Member

    Thanks to #23735 now you can do : bootstrap.Util because bootstrap is a global var

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsJavaScript or TypeScript sources and pluginsv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions