Skip to content

Commit

Permalink
Remove all getter methods
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Sep 6, 2017
1 parent 76bd269 commit b191a64
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 32 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ sandbox.allowSameOrigin | boolean | true | Allows the iframe content to be treat
sandbox.allowScripts | boolean | true | Re-enables scripts.
sandbox.allowTopNavigation | boolean | false | Allows the iframe content to navigate its top-level browsing context.

### Getters

Name | Description
:--- | :----------
contentWindow | The Window object of an iframe element.

## License

MIT
16 changes: 1 addition & 15 deletions docs/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -24408,10 +24408,6 @@ var _react = __webpack_require__("../node_modules/react/react.js");

var _react2 = _interopRequireDefault(_react);

var _reactDom = __webpack_require__("../node_modules/react-dom/index.js");

var _reactDom2 = _interopRequireDefault(_reactDom);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
Expand Down Expand Up @@ -24464,16 +24460,6 @@ var Iframe = (_temp = _class = function (_PureComponent) {
}, style)
}));
}
}, {
key: 'contentWindow',
get: function get() {
var iframe = _reactDom2.default.findDOMNode(this);

var _iframe = _extends({}, iframe),
contentWindow = _iframe.contentWindow;

return contentWindow;
}
}]);

return Iframe;
Expand Down Expand Up @@ -24912,4 +24898,4 @@ _reactDom2.default.render(_react2.default.createElement(App, null), document.get
/***/ })

/******/ });
//# sourceMappingURL=bundle.js.map?3d0ff96021fa6cf51610
//# sourceMappingURL=bundle.js.map?01485b888180337f9b4a
2 changes: 1 addition & 1 deletion docs/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
</head>
<body>
<div id="container"></div>
<script type="text/javascript" src="bundle.js?3d0ff96021fa6cf51610"></script></body>
<script type="text/javascript" src="bundle.js?01485b888180337f9b4a"></script></body>
</html>
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@trendmicro/react-iframe",
"version": "0.2.0",
"version": "0.3.0",
"description": "React Iframe component",
"main": "lib/index.js",
"files": [
Expand Down Expand Up @@ -43,8 +43,7 @@
"iframe"
],
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0",
"react-dom": "^0.14.0 || ^15.0.0"
"react": "^0.14.0 || ^15.0.0"
},
"dependencies": {
"prop-types": "^15.5.8"
Expand Down
6 changes: 0 additions & 6 deletions src/Iframe.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint jsx-a11y/iframe-has-title: 0 */
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';

const mapSandboxToString = (sandbox = '') => {
if (typeof sandbox === 'string') {
Expand Down Expand Up @@ -57,11 +56,6 @@ class Iframe extends PureComponent {
}
};

get contentWindow() {
const iframe = ReactDOM.findDOMNode(this);
const { contentWindow } = { ...iframe };
return contentWindow;
}
render() {
const { style, ...props } = this.props;

Expand Down

0 comments on commit b191a64

Please sign in to comment.