12033: Add mithril via npm.
[arvados.git] / apps / workbench / app / assets / javascripts / mithril_mount.js
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 // rails_npm does "window.Mithril = require('mithril')" for us.
6 var m = window.Mithril
7
8 $(document).on('ready arv:pane:loaded', function() {
9     $('[data-mount-mithril]').each(function() {
10         m.mount(this, window.components[$(this).data('mount-mithril')])
11     })
12 })