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

fix(examples): Use window in favour of deprecated frameWindow prop #64

Merged
merged 3 commits into from Apr 17, 2019

Conversation

@michaeltaranto
Copy link
Contributor

commented Apr 17, 2019

As reported here the material-ui and (also the reakit example) are not working since moving away from react-frame-component as there is no frameWindow provided.

Given updated iframe solution switching to window directly should be fine now.

Fixes #62

@@ -11,7 +11,7 @@ export default class FrameComponent extends React.Component {
this.generateClassName = createGenerateClassName();
this.jss = create({
...jssPreset(),
insertionPoint: props.frameWindow.document.head
insertionPoint: window.document.head

This comment has been minimized.

Copy link
@markdalgleish

markdalgleish Apr 17, 2019

Member

I think this entire line is redundant now, actually, since the code is executing within the iframe.

<Provider theme={theme}>
<StyleSheetManager target={frameWindow.document.head}>
<StyleSheetManager target={window.document.head}>

This comment has been minimized.

Copy link
@markdalgleish

markdalgleish Apr 17, 2019

Member

I don't think this is needed anymore, either.

michaeltaranto added some commits Apr 17, 2019

@michaeltaranto michaeltaranto merged commit b2f3bc6 into master Apr 17, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@michaeltaranto michaeltaranto deleted the fix-frame-window branch Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.