const ARROW = "https://unpkg.com/@jpmorganchase/perspective-examples/build/superstore.arrow"; window.addEventListener('WebComponentsReady', function() { // Fetch and load arrow data. var xhr = new XMLHttpRequest(); xhr.open('GET', ARROW, true); xhr.responseType = "arraybuffer" xhr.onload = function() { // Get element from the DOM. var el = document.getElementsByTagName('perspective-viewer')[0]; // Load the arrow response in the `` DOM reference. el.load(xhr.response); // Toggle the config controls open. el.toggleConfig(); } xhr.send(null); });