Integration
Integrating one of our widgets to your page starts with adding this js snippet to your page.
(function (w, d, s) {
if (w.SDW) console.error('SDW widget already included');
w.SDW = {}, w.SDW._r = s; methods = ['mount', 'unmount', 'addWidget', 'updateWidget', 'removeWidget', 'initStyles'];
w.SDW._q = []; methods.forEach(method => w.SDW[method] = function () { w.SDW._q.push([method, arguments]) });
var script = d.createElement('script'); script.async = 1; script.src = s;
var before = d.getElementsByTagName('script')[0]; before.parentNode.insertBefore(script, before);
})(window, document, "https://widgets.shadow.gg/realtime2/scriptLoader.js");
After the widget framework code got integrated to your page, you can start interacting with our widget framework. As soon as the widget got loaded, you can interact with it via the newly added SDW
property on your window element. We are providing an easy to use and understand interface
for you convenience.
Visual Requirements for your page
All Bayes widgets are recommneded to have at least 420 pixels width to have a consistant look and feel. Everything below that is not guaranteed to work and look as intended. All widgets are fully responsive though. You can adapt the style of our widgets to fit the rest of your page by applying your own theme.