-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Currently we use iframes for widgets. (e.g. https://rcn.io/widgets/upcoming-events). I frames are slow and clunky.
See how angel.co does that (no iframes)
<script data-startup="apination"
src="https://angel.co/javascripts/embed_jobs.js"
id="angellist_embed" async>
</script>(function () {
var element = document.getElementById('angellist_embed');
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var div = document.createElement('div');
div.innerHTML = xmlhttp.responseText;
element.parentNode.insertBefore(div, element);
}
}
var startup_slug = element.getAttribute('data-startup');
xmlhttp.open("GET", "https://angel.co/job_profiles/embed?startup="+startup_slug, true);
xmlhttp.send();
})();Reactions are currently unavailable