rygramer / embedflowinexternalwebsite Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
When I try to display the site using all the steps you described (someone else had to enter it into the website unfortunatly as I don;t have access), I get an error, do you know what is causing this? (I am not a developper, but a learning admin, so codes are still a bit hocus poces sometimes....)
// make sure we don't redefine the api if already present
if (!window.$Lightning) {
$Lightning = (function() {
// delegate status
var delegateLoaded = false;
// queue to store un-delegated calls
var callQueue = [];
// util methods
function getDelegateScriptUrl() {
// load the delegate script based on stored version (got from aura nonce) or get latest version
var url = "/lightning/lightning.out.delegate.js?v=" + getDelegateScriptVersion();
// Extract the base path from our own <script> include to adjust for LC4VF/Communities/Sites
var scripts = document.getElementsByTagName("script");
for (var m = 0; m < scripts.length; m++) {
var script = scripts[m].src;
var i = script.indexOf("/lightning/lightning.out.js");
if (i >= 0) {
var basePath = script.substring(0, i);
url = basePath + url;
break;
}
}
return url;
}
function getDelegateScriptVersion(){
try {
if(localStorage.lightningOutDelegateVersion){
return localStorage.lightningOutDelegateVersion;
}
} catch (e) {}
return (new Date()).getTime();
}
function loadDelegateScript() {
var script = document.createElement('script');
script.type = "text/javascript";
script.src = getDelegateScriptUrl();
script.onload = function() {
delegateLoaded = true;
while(callQueue.length) {
$Lightning._delegate.use.apply(this, callQueue.shift());
}
}
document.head.appendChild(script);
}
// load delegate
loadDelegateScript();
return {
use: function() {
var args = Array.prototype.slice.call(arguments);
if (delegateLoaded) {
return $Lightning._delegate.use.apply(this, args);
} else {
// queue the request
return callQueue.push(args);
}
},
createComponent: function() {
return $Lightning._delegate.createComponent.apply(this, Array.prototype.slice.call(arguments));
},
getApplication: function() {
return $Lightning._delegate.getApplication.apply(this, Array.prototype.slice.call(arguments));
},
lightningLoaded: function() {
return $Lightning._delegate.lightningLoaded.apply(this, Array.prototype.slice.call(arguments));
},
ready: function() {
return $Lightning._delegate.ready.apply(this, Array.prototype.slice.call(arguments));
}
}
})();
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.