<p dir="auto">Bootstrap components are defined as constructor functions in a private scope. While they are exposed globally within <code class="notranslate">$.fn</code>, they are called with references to those constructors within that private scope.</p>
<p dir="auto">That means that there's no way to replace or wrap the code within the constructor function from 3rd party code. The use case that I'm imagining: modifying the behavior of the stock components without maintaining a fork of Bootstrap.</p>
<p dir="auto">The design that seems appropriate is moving the code from within the constructor functions into an init method on the constructor's prototype, leaving all constructor functions looking something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var Affix = function (element, options) {
  this.init(element, options);
}"><pre class="notranslate"><code class="notranslate">var Affix = function (element, options) {
  this.init(element, options);
}
</code></pre></div>
<p dir="auto">That would allow global access to override the init method, via <code class="notranslate">$.fn.affix.Constructor.init</code> which would also affect the reference to the constructor as <code class="notranslate">Affix</code> within its private scope. The change should not affect any functionality or the API beyond exposing the constructor function for manipulation. If this sounds good, I'll be happy to make a PR.</p>
<p dir="auto">I apologize if this is revisiting an old question that's been resolved - I wasn't able to find historical work on this, but I know that doesn't mean it's not out there!</p>
<p dir="auto">Dropdowns experience the same clipping problems as tooltips, so one solution would be to allow specifying <code class="notranslate">data-container="body"</code>, as you can with tooltips.</p>
<p dir="auto">This means the .dropdown-menu would have to be positioned with JS, like the tooltip, and I don't know what problems would be introduced by shipping the ul.dropdown-menu elsewhere in the DOM, even temporarily.</p>
<p dir="auto">The wrath of overflow: hidden...</p>