We are trying to adopt custom elements for some parts of your UI and ran into the issue that during an update to the tree, custom attributes on the the custom elements are not removed correctly as can be seen here: http://jsbin.com/ferohipaje/edit?html,output (you will need to click on "false" and then inspect the DOM node in the dev tools of the browser).

I've tracked the issue to the `_updateDOMProperties` method in `ReactDOMComponent.js`. It seems that there is a special check in the loop for `nextProps`:

``` js
else if (isCustomComponent(this._tag, nextProps)) {
  if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
    DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
  }
}
```

But the corresponding section is missing for `lastProps` (deleting), which results in the incorrect behavior.

I'm starting the work on the patch.

case 'img':
      case 'form':
      case 'video':
      case 'audio':
        var listeners = this._wrapperState.listeners;
        if (listeners) {
          for (var i = 0; i < listeners.length; i++) {
            listeners[i].remove();
          }
        }
        break;
      case 'input':
      case 'textarea':
        inputValueTracking.stopTracking(this);
        break;
      case 'html':
      case 'head':
      case 'body':
        /**
         * Components like <html> <head> and <body> can't be removed or added
         * easily in a cross-browser way, however it's valuable to be able to
         * take advantage of React's reconciliation for styling and <title>
         * management. So we just document it and throw in dangerous cases.
         */
        invariant(
          false,
          '<%s> tried to unmount. Because of cross-browser quirks it is ' +
          'impossible to unmount some top-level components (eg <html>, ' +
          '<head>, and <body>) reliably and efficiently. To fix this, have a ' +
          'single top-level component that never unmounts render these ' +