Sha256: 02dc9259fe70f942c63b1f0dca480da4356d9a33ce8245a7e6a17eeb6261d7c6
Contents?: true
Size: 715 Bytes
Versions: 75
Compression:
Stored size: 715 Bytes
Contents
var eventName = typeof(Turbolinks) !== 'undefined' ? 'turbolinks:load' : 'DOMContentLoaded'; if (!document.documentElement.hasAttribute("data-turbolinks-preview")) { document.addEventListener(eventName, function flash() { var flashData = JSON.parse(document.getElementById('shopify-app-flash').dataset.flash); var Toast = window['app-bridge'].actions.Toast; if (flashData.notice) { Toast.create(app, { message: flashData.notice, duration: 5000, }).dispatch(Toast.Action.SHOW); } if (flashData.error) { Toast.create(app, { message: flashData.error, duration: 5000, isError: true, }).dispatch(Toast.Action.SHOW); } }); }
Version data entries
75 entries across 75 versions & 2 rubygems