diff options
Diffstat (limited to 'mdl/mdlFfi.js')
-rw-r--r-- | mdl/mdlFfi.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mdl/mdlFfi.js b/mdl/mdlFfi.js index f961cab..97c4166 100644 --- a/mdl/mdlFfi.js +++ b/mdl/mdlFfi.js @@ -1,5 +1,6 @@ // Copyright 2015 Google Inc. // Copyright 2016 Benjamin Barenblat +// Copyright 2016 Chelsea Voss // // Licensed under the Apache License, Version 2.0 (the “License”); you may not // use this file except in compliance with the License. You may obtain a copy @@ -15,14 +16,20 @@ "use strict"; -var UrWeb = { - MdlFfi: { - +(function() { + var mdlFfi = { showSnackbar: function(id, text) { document.querySelector('#' + id) .MaterialSnackbar.showSnackbar({message: text}); }, + }; + try { + UrWeb.MdlFfi = mdlFfi; + } catch (ReferenceError) { + console.log("asdf"); + window.UrWeb = {MdlFfi: mdlFfi}; + console.log("hjkl"); } -}; // UrWeb.MdlFfi +})(); // UrWeb.MdlFfi |