code: function registerElementPatch(_global) {
      if (!isBrowser || !('registerElement' in _global.document)) {
          return;
      }
      var _registerElement = document.registerElement;
      var callbacks = ['createdCallback', 'attachedCallback', 'detachedCallback', 'attributeChangedCallback'];
      document.registerElement = function (name, opts) {
          if (opts && opts.prototype) {
              callbacks.forEach(function (callback) {
                  var source = 'Document.registerElement::' + callback;
                  if (opts.prototype.hasOwnProperty(callback)) {
                      var descriptor = Object.getOwnPropertyDescriptor(opts.prototype, callback);
                      if (descriptor && descriptor.value) {
                          descriptor.value = Zone.current.wrap(descriptor.value, source);
                          _redefineProperty(opts.prototype, callback, descriptor);
                      }
                      else {
                          opts.prototype[callback] = Zone.current.wrap(opts.prototype[callback], source);
                      }
                  }
                  else if (opts.prototype[callback]) {
                      opts.prototype[callback] = Zone.current.wrap(opts.prototype[callback], source);
                  }
              });
          }
          return _registerElement.apply(document, [name, opts]);
      };
  }
docs: @license
  Copyright Google Inc. All Rights Reserved.
  
  Use of this source code is governed by an MIT-style license that can be
  found in the LICENSE file at https://angular.io/license