<!DOCTYPE html>
<style>
div { color: pink }
:focus { outline: none }
:focus #inner { color: green }
</style>
<div id="focused" tabIndex="1" onfocus="document.styleSheets[0].deleteRule(0);">
    <span id="inner">This text should be green - no crash.</span>
</div>
<script>
document.getElementById("focused").focus();
</script>
