Skip to content

Commit

Permalink
[build] 0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
toxic-johann committed Dec 27, 2017
1 parent 4eddfcb commit cb5058b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
9 changes: 4 additions & 5 deletions lib/index.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3300,9 +3300,9 @@ var ESFullScreen = (_dec = autobindClass(), _dec2 = alias('requestFullscreen'),
function ESFullScreen() {
classCallCheck(this, ESFullScreen);
this._fullscreenElement = null;
this.isNativelySupport = defined(native('fullscreenElement')) && (!defined(fullscreenEnabled) || fullscreenEnabled === true);
this._openKey = native(document.body, 'requestFullscreen', { keyOnly: true });
this._exitKey = native('exitFullscreen', { keyOnly: true });
this.isNativelySupport = inBrowser ? defined(native('fullscreenElement')) && (!defined(fullscreenEnabled) || fullscreenEnabled === true) : false;
this._openKey = inBrowser ? native(document.body, 'requestFullscreen', { keyOnly: true }) : '';
this._exitKey = inBrowser ? native('exitFullscreen', { keyOnly: true }) : '';
}

createClass(ESFullScreen, [{
Expand Down Expand Up @@ -3412,9 +3412,8 @@ var ESFullScreen = (_dec = autobindClass(), _dec2 = alias('requestFullscreen'),
}]);
return ESFullScreen;
}(), _applyDecoratedDescriptor(_class2.prototype, 'open', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'open'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'exit', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'exit'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'on', [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, 'on'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'off', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'off'), _class2.prototype), _class2)) || _class);
/* istanbul ignore */

var index = inBrowser ? new ESFullScreen() : {};
var index = new ESFullScreen();

return index;

Expand Down
9 changes: 4 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ var ESFullScreen = (_dec = toxicDecorators.autobindClass(), _dec2 = toxicDecorat
_classCallCheck(this, ESFullScreen);

this._fullscreenElement = null;
this.isNativelySupport = toxicPredicateFunctions.defined(native('fullscreenElement')) && (!toxicPredicateFunctions.defined(fullscreenEnabled) || fullscreenEnabled === true);
this._openKey = native(document.body, 'requestFullscreen', { keyOnly: true });
this._exitKey = native('exitFullscreen', { keyOnly: true });
this.isNativelySupport = inBrowser ? toxicPredicateFunctions.defined(native('fullscreenElement')) && (!toxicPredicateFunctions.defined(fullscreenEnabled) || fullscreenEnabled === true) : false;
this._openKey = inBrowser ? native(document.body, 'requestFullscreen', { keyOnly: true }) : '';
this._exitKey = inBrowser ? native('exitFullscreen', { keyOnly: true }) : '';
}

_createClass(ESFullScreen, [{
Expand Down Expand Up @@ -282,8 +282,7 @@ var ESFullScreen = (_dec = toxicDecorators.autobindClass(), _dec2 = toxicDecorat

return ESFullScreen;
}(), _applyDecoratedDescriptor(_class2.prototype, 'open', [_dec2], _Object$getOwnPropertyDescriptor(_class2.prototype, 'open'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'exit', [_dec3], _Object$getOwnPropertyDescriptor(_class2.prototype, 'exit'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'on', [_dec4], _Object$getOwnPropertyDescriptor(_class2.prototype, 'on'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'off', [_dec5], _Object$getOwnPropertyDescriptor(_class2.prototype, 'off'), _class2.prototype), _class2)) || _class);
/* istanbul ignore */

var index = inBrowser ? new ESFullScreen() : {};
var index = new ESFullScreen();

module.exports = index;
2 changes: 1 addition & 1 deletion lib/index.min.js

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions lib/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ var ESFullScreen = (_dec = autobindClass(), _dec2 = alias('requestFullscreen'),
_classCallCheck(this, ESFullScreen);

this._fullscreenElement = null;
this.isNativelySupport = defined(native('fullscreenElement')) && (!defined(fullscreenEnabled) || fullscreenEnabled === true);
this._openKey = native(document.body, 'requestFullscreen', { keyOnly: true });
this._exitKey = native('exitFullscreen', { keyOnly: true });
this.isNativelySupport = inBrowser ? defined(native('fullscreenElement')) && (!defined(fullscreenEnabled) || fullscreenEnabled === true) : false;
this._openKey = inBrowser ? native(document.body, 'requestFullscreen', { keyOnly: true }) : '';
this._exitKey = inBrowser ? native('exitFullscreen', { keyOnly: true }) : '';
}

_createClass(ESFullScreen, [{
Expand Down Expand Up @@ -278,8 +278,7 @@ var ESFullScreen = (_dec = autobindClass(), _dec2 = alias('requestFullscreen'),

return ESFullScreen;
}(), _applyDecoratedDescriptor(_class2.prototype, 'open', [_dec2], _Object$getOwnPropertyDescriptor(_class2.prototype, 'open'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'exit', [_dec3], _Object$getOwnPropertyDescriptor(_class2.prototype, 'exit'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'on', [_dec4], _Object$getOwnPropertyDescriptor(_class2.prototype, 'on'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'off', [_dec5], _Object$getOwnPropertyDescriptor(_class2.prototype, 'off'), _class2.prototype), _class2)) || _class);
/* istanbul ignore */

var index = inBrowser ? new ESFullScreen() : {};
var index = new ESFullScreen();

export default index;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "es-fullscreen",
"version": "0.2.2",
"version": "0.2.3",
"description": "fullscreen library written in es6",
"main": "lib/index.js",
"module": "lib/index.mjs",
Expand Down
13 changes: 7 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ class ESFullScreen {
isNativelySupport: boolean;

_fullscreenElement = null;
isNativelySupport = defined(native('fullscreenElement')) &&
(!defined(fullscreenEnabled) || fullscreenEnabled === true);
_openKey = native(document.body, 'requestFullscreen', { keyOnly: true });
_exitKey = native('exitFullscreen', { keyOnly: true });
isNativelySupport = inBrowser
? (defined(native('fullscreenElement')) &&
(!defined(fullscreenEnabled) || fullscreenEnabled === true))
: false;
_openKey = inBrowser ? native(document.body, 'requestFullscreen', { keyOnly: true }) : '';
_exitKey = inBrowser ? native('exitFullscreen', { keyOnly: true }) : '';

get fullscreenElement(): Element | null {
const element = [
Expand Down Expand Up @@ -132,5 +134,4 @@ class ESFullScreen {
});
}
}
/* istanbul ignore */
export default inBrowser ? new ESFullScreen() : {};
export default new ESFullScreen();

0 comments on commit cb5058b

Please sign in to comment.