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

fix #533, make a zone-mix to handle like electron/nw to patch browser and nodejs#608

Merged
mhevery merged 1 commit intoangular:masterfrom
JiaLiPassion:issue-533
Jan 23, 2017
Merged

fix #533, make a zone-mix to handle like electron/nw to patch browser and nodejs#608
mhevery merged 1 commit intoangular:masterfrom
JiaLiPassion:issue-533

Conversation

@JiaLiPassion
Copy link
Copy Markdown
Collaborator

@JiaLiPassion JiaLiPassion commented Jan 22, 2017

fix #533, in electron/nw.js, we may need to patch both browser API and nodejs API, so we need a zone-mix.js to contains both patched API.

Copy link
Copy Markdown
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but i am wondering about the mix name. Why not just electron?

Comment thread lib/common/utils.ts
!isNode && !isWebWorker && !!(typeof window !== 'undefined' && window['HTMLElement']);

// we are in electron of nw, so we are both browser and nodejs
export const isMix: boolean = typeof process !== 'undefined' &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we call it mix? Would electron be a better name?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wonder if nw.js is the same with electron, if we only handle electron, zone-electron is a better name

@JiaLiPassion
Copy link
Copy Markdown
Collaborator Author

@mhevery , I think nw.js should have the same behavior with electron, so I use zone-mix and isMix name here, please review.

@mhevery mhevery merged commit 6d31734 into angular:master Jan 23, 2017
@JiaLiPassion JiaLiPassion deleted the issue-533 branch February 14, 2017 06:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zone-node does not trigger change detection in Angular-CLI projects since version 1.0.0-beta.20

3 participants