Git Product home page Git Product logo

embedflowinexternalwebsite's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

embedflowinexternalwebsite's Issues

Error displaying site

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));
		}
	}
})();

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.