17706: Merge branch 'master' into 17706-costanalyzer-uncommitted-container-requests
[arvados.git] / apps / workbench / app / assets / javascripts / mithril_mount.js
index fe0907ed257a4dbd329842adcb009446c87529f9..7995ffea6ab8a69dd97030bef774de3599dfe5e6 100644 (file)
@@ -2,11 +2,9 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-// rails_npm does "window.Mithril = require('mithril')" for us.
-var m = window.Mithril
-
 $(document).on('ready arv:pane:loaded', function() {
     $('[data-mount-mithril]').each(function() {
-        m.mount(this, window.components[$(this).data('mount-mithril')])
+        var data = $(this).data()
+        m.mount(this, {view: function () {return m(window[data.mountMithril], data)}})
     })
 })