Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed May 8, 2015
1 parent 3122a48 commit 18f5511
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion dist/zone-microtask.js
Original file line number Diff line number Diff line change
Expand Up @@ -1703,19 +1703,21 @@ function apply() {
if (!('registerElement' in global.document)) {
return;
}

var _registerElement = document.registerElement;
var callbacks = [
'createdCallback',
'attachedCallback',
'detachedCallback',
'attributeChangedCallback'
];

document.registerElement = function (name, opts) {
callbacks.forEach(function (callback) {
if (opts.prototype[callback]) {
var descriptor = Object.getOwnPropertyDescriptor(opts.prototype, callback);
if (descriptor.value) {
descriptor.value = zone.bind(descriptor.value || opts.prototype[callback]);
descriptor.value = global.zone.bind(descriptor.value || opts.prototype[callback]);
_redefineProperty(opts.prototype, callback, descriptor);
}
}
Expand Down
Loading

0 comments on commit 18f5511

Please sign in to comment.