Upgrade the JS HTMLElement to the Dart class. Used by Dart's Polymer.

Source

createCustomUpgrader(Type customElementClass, $this) {
  var dartClass;
  try {
    dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
  } catch (e) {
    throw e;
  } finally {
    // Need to remember the Dart class that was created for this custom so
    // return it and setup the blink_jsObject to the $this that we'll be working
    // with as we talk to blink.
    $this['dart_class'] = dartClass;
  }

  return dartClass;
}