Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire state-changed upon setState of window #250

Merged
merged 1 commit into from
Jun 4, 2019

Conversation

bingenito
Copy link
Member

Fixes #248

@bingenito bingenito requested a review from a team June 4, 2019 14:19
@codecov
Copy link

codecov bot commented Jun 4, 2019

Codecov Report

Merging #250 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #250      +/-   ##
==========================================
+ Coverage   93.57%   93.61%   +0.03%     
==========================================
  Files          16       16              
  Lines        1494     1503       +9     
  Branches      253      255       +2     
==========================================
+ Hits         1398     1407       +9     
  Misses         96       96
Impacted Files Coverage Δ
packages/desktopjs/src/window.ts 88.88% <ø> (ø) ⬆️
packages/desktopjs-electron/src/electron.ts 97.01% <100%> (+0.02%) ⬆️
packages/desktopjs/src/Default/default.ts 97.41% <100%> (+0.03%) ⬆️
packages/desktopjs-openfin/src/openfin.ts 87.28% <100%> (+0.11%) ⬆️

return Promise.resolve();
}
const promise = (this.innerWindow && this.innerWindow.webContents)
? this.innerWindow.webContents.executeJavaScript(`if (window.setState) { window.setState(JSON.parse(\`${JSON.stringify(state)}\`)); }`)
Copy link
Member

Choose a reason for hiding this comment

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

This is still not the nicest code ever :(

@bingenito bingenito merged commit b28ffa7 into morganstanley:master Jun 4, 2019
@bingenito bingenito deleted the ISSUE-248 branch May 28, 2021 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fire 'state-changed' event after setState
2 participants