mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 19:13:54 +00:00
Make it safe to reparent the #webamp node
For now users can't control where Webamp inserts itself into the DOM. We want to add that as and option. In the mean time, we can enable users to hack it. For example, https://github.com/ShizukuIchi/winXP wants to be able to keep Webamp in a div in order to control how it gets layerd with other apps.
This commit is contained in:
parent
2fb9d38f44
commit
f45a3ec3f3
1 changed files with 4 additions and 1 deletions
|
|
@ -42,7 +42,10 @@ class App extends React.Component {
|
|||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("resize", this._handleWindowResize);
|
||||
document.body.removeChild(this._webampNode);
|
||||
const parentNode = this._webampNode.parentNode;
|
||||
if (parentNode != null) {
|
||||
parentNode.removeChild(this._webampNode);
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue