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

fix(addEventListener patch): ignore FunctionWrapper for IE11 & Edge d…#155

Closed
marclaval wants to merge 1 commit intoangular:masterfrom
marclaval:IEDevTools
Closed

fix(addEventListener patch): ignore FunctionWrapper for IE11 & Edge d…#155
marclaval wants to merge 1 commit intoangular:masterfrom
marclaval:IEDevTools

Conversation

@marclaval
Copy link
Copy Markdown
Contributor

…ev tools

Fixes the issue described in #150 in the IE and Edge dev tools.
These tools add add event listeners with a special object as a handler, a FunctionWrapper. Zone shouldn't interfere with those.

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Aug 17, 2015

LGTM, thanks @Mlaval !

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Aug 17, 2015

merged as 3b0ca3f

@wizarrc
Copy link
Copy Markdown

wizarrc commented Jun 15, 2017

@Mlaval @vicb please reopen.

https://github.com/angular/zone.js/blob/master/lib/common/utils.ts#L368

I don't know if anyone has checked lately, but the latest version of Edge, data.handler.toString() does not return [object FunctionWrapper] but function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] } instead. I made changes to zone.js/utils.ts to see if the browser events would go away in my performance tab, and sure enough they did.

Can anyone confirm this issue is back in EdgeHTML 15? There should be a better way than just check a string, because they have seemed to changed their internal function. Anyways, below is my local changes and works on my machine.

var testString = data.handler.toString();
validZoneHandler = data.handler && (testString === '[object FunctionWrapper]' || testString == 'function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }');

@vicb
Copy link
Copy Markdown
Contributor

vicb commented Jun 15, 2017

@wizarrc could you please open a new issue. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants