Skip to content

Conversation

@wrbright
Copy link
Contributor

@wrbright wrbright commented Dec 4, 2020

No description provided.

@wrbright wrbright closed this Dec 4, 2020
@wrbright wrbright reopened this Dec 4, 2020
@902seanryan 902seanryan self-requested a review January 11, 2021 17:33


document.addEventListener('fullscreenchange', () => {
this.sendProperty('fullScreen', this.isFullScreen);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this one is different from the rest? this.isFullScreen returns an html element object, so the client just receives and object. You could just throw in the this.sendAllProperties() call instead.

toggleFullScreen() {
if (!document.fullscreenElement) {
this.iFrame.requestFullscreen().then(() => {
this.sendProperty(FullScreenPlugin.fullscreenKey, document.fullscreenElement != null ? 'true' : 'false');
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also use the this.sendAllProperties() here, just to avoid the duplication.



document.addEventListener('fullscreenchange', () => {
this.sendAllProperties(FullScreenPlugin.fullscreenKey, this.isFullScreen);
Copy link
Contributor

Choose a reason for hiding this comment

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

sendAllProperties doesn't actually need any input its implemented down on line 75, it just sends the currently active property.

Copy link
Contributor

Choose a reason for hiding this comment

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

But the sendAllProperties call doesn't actually use the isFullScreen get so it might be worth updating that just to keep everything consistent.

@wrbright wrbright requested a review from aberkie January 26, 2021 14:46
@902seanryan 902seanryan merged commit 768abb3 into SpringRoll:develop Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants