{"action":"created","issue":{"url":"https://api.github.com/repos/redom/redom/issues/95","repository_url":"https://api.github.com/repos/redom/redom","labels_url":"https://api.github.com/repos/redom/redom/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/redom/redom/issues/95/comments","events_url":"https://api.github.com/repos/redom/redom/issues/95/events","html_url":"https://github.com/redom/redom/issues/95","id":278126839,"number":95,"title":"No mount events when mounting into Shadow DOM","user":{"login":"perry-mitchell","id":3869469,"avatar_url":"https://avatars0.githubusercontent.com/u/3869469?v=4","gravatar_id":"","url":"https://api.github.com/users/perry-mitchell","html_url":"https://github.com/perry-mitchell","followers_url":"https://api.github.com/users/perry-mitchell/followers","following_url":"https://api.github.com/users/perry-mitchell/following{/other_user}","gists_url":"https://api.github.com/users/perry-mitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/perry-mitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perry-mitchell/subscriptions","organizations_url":"https://api.github.com/users/perry-mitchell/orgs","repos_url":"https://api.github.com/users/perry-mitchell/repos","events_url":"https://api.github.com/users/perry-mitchell/events{/privacy}","received_events_url":"https://api.github.com/users/perry-mitchell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-11-30T13:51:58Z","updated_at":"2017-11-30T14:05:01Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\nLove this library. Found a little quirk though today.. I've been using ShadowRoots to create safe containers for styles etc, and have been using Redom to populate the root with elements (which works fine):\r\n\r\n```javascript\r\nconst myRootEl = document.createElement(\"div\");\r\nconst myRoot = myRootEl.createShadowRoot();\r\n\r\nfunction MyCustomElement() {\r\n  this.el = el(\"div\", \"Hello there\");\r\n  this.onmount = function() {\r\n    console.log(\"Mounted..\");\r\n  }\r\n}\r\n\r\nconst myElement = new MyCustomElement();\r\nmount(myRoot, myElement);\r\n```\r\n\r\nIn my example ^, \"Mounted..\" is never logged. If I were to change the mount line to `mount(myRootEl, myElement)` (so that it mounts to a \"real\" element), the log comes.\r\n\r\nThis problem may become more prevalent as the Shadow DOM API is implemented by more browsers, but it has been in Chrome for some time. Are there any plans to fix this? Would you accept a PR if you're too busy?"},"comment":{"url":"https://api.github.com/repos/redom/redom/issues/comments/348196875","html_url":"https://github.com/redom/redom/issues/95#issuecomment-348196875","issue_url":"https://api.github.com/repos/redom/redom/issues/95","id":348196875,"user":{"login":"perry-mitchell","id":3869469,"avatar_url":"https://avatars0.githubusercontent.com/u/3869469?v=4","gravatar_id":"","url":"https://api.github.com/users/perry-mitchell","html_url":"https://github.com/perry-mitchell","followers_url":"https://api.github.com/users/perry-mitchell/followers","following_url":"https://api.github.com/users/perry-mitchell/following{/other_user}","gists_url":"https://api.github.com/users/perry-mitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/perry-mitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perry-mitchell/subscriptions","organizations_url":"https://api.github.com/users/perry-mitchell/orgs","repos_url":"https://api.github.com/users/perry-mitchell/repos","events_url":"https://api.github.com/users/perry-mitchell/events{/privacy}","received_events_url":"https://api.github.com/users/perry-mitchell/received_events","type":"User","site_admin":false},"created_at":"2017-11-30T14:05:01Z","updated_at":"2017-11-30T14:05:01Z","author_association":"NONE","body":"For me it seems to break on this like: `if (remount || (!triggered && (traverse && traverse.__redom_mounted))) {`:\r\n\r\nhttps://github.com/redom/redom/blob/2051da55600538c055de00517eb852f54e636b7f/src/mount.js#L61\r\n\r\nSeems like the `__redom_mounted` property isn't able to be set on the Shadow Root. Seems kind of problematic due to the fact that this is used for tracking the mount status (so it seems) on each element.."}}
{"actor":{"display_login":"perry-mitchell"}}