It's this specificity part I'm not sure about, as it doesn't seem consistent with how "implied stuff" in@scopeis intended to work. For example, the#barselector effectively gets an implied:where(:scope)selector prepended (#10196), which adds no specificity. ...
In case you possess a specific identifier, such as <code> id </code>, to distinguish the internal component from the external one, you can employ <code> querySelector </code>. if (document.getElementById("outerDiv").querySelector("#innerDiv")) { // Yes, it's inside it } else {...