Edit in JSFiddle

var embedUlmDevice = {} || embedUlmDevice;
embedUlmDevice.embedding = function(cont, source) {
  var createElements = {} || createElements;
  createElements.createEls = function(name, props, text) {
    var el = document.createElement(name),
      p;
    for (p in props) {
      if (props.hasOwnProperty(p)) {
        el[p] = props[p];
      }
    }
    if (text) {
      el.appendChild(document.createTextNode(text));
    }
    return el;
  };
  createElements.makeid = function() {
    var text = "";
    var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
    for (var i = 0; i < 5; i++)
      text += possible.charAt(Math.floor(Math.random() * possible.length));
    return text;
  }
  var ulmframe = createElements.createEls("iframe", {
    id: "ulmdevice_" + createElements.makeid(),
    className: "ulmdevice",
    src: source,
    style: "width:100%; height:460px; border:1px solid #9c9c9c"
  }, null);

  cont.appendChild(ulmframe);
}

// using google url shortener - https://goo.gl/
var mycode = "https://goo.gl/nlauQr";
embedUlmDevice.embedding(document.getElementById('container'), mycode);
<div id="container">

</div>