You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently mount the in-browser UI in a div element in the body. This can interfere with the selector generator, causing it to generate a selector that won't work without the UI mounted. For example:
<body><div></div><!-- Our mount --><div>
This is some user content.
</div></body>
The selector generator might generate body div:nth-of-type(2), which would select the wrong element when run in a script. To lessen the risk we could append the mount after all the content, but this is at odds with loading the UI as fast as possible.
To get around the nth-of-type problem we should use a custom element e.g. ksix-studio-mount, that decreases the risk of weird interactions with the original DOM.
Another improvement would be to make sure our mount is always at the bottom, but this might require us to monitor DOM changes and move the mount to the bottom. It's possible that React won't like this.
Criteria for considering it done
The mount is using a custom element. Optionally, the mount is continuously moved to be the last element of the body.
The text was updated successfully, but these errors were encountered:
What?
We currently mount the in-browser UI in a div element in the body. This can interfere with the selector generator, causing it to generate a selector that won't work without the UI mounted. For example:
The selector generator might generate
body div:nth-of-type(2)
, which would select the wrong element when run in a script. To lessen the risk we could append the mount after all the content, but this is at odds with loading the UI as fast as possible.To get around the
nth-of-type
problem we should use a custom element e.g.ksix-studio-mount
, that decreases the risk of weird interactions with the original DOM.Another improvement would be to make sure our mount is always at the bottom, but this might require us to monitor DOM changes and move the mount to the bottom. It's possible that React won't like this.
Criteria for considering it done
The mount is using a custom element. Optionally, the mount is continuously moved to be the last element of the body.
The text was updated successfully, but these errors were encountered: