(no title)
stonewareslord | 3 years ago
Here's a minimal example (https://jsfiddle.net/wc5dn9x2/):
<img id="asdf" name="getElementById" />
<script>
// The img object
console.log(document.getElementById);
// TypeError: document.getElementById is not a function :D
console.log(document.getElementById('asdf'));
</script>
I tried poking around for security vulnerabilities with this but couldn't find any :(It seems that the names overwrite properties on document with themselves only for these elements: embed form iframe img object
Edit: Here's how I found this: https://jsfiddle.net/wc5dn9x2/1/
jefftk|3 years ago
stonewareslord|3 years ago
dwild|3 years ago
It's weirdly not that discussed on the web, most probably because it require a pretty specific situation.
stonewareslord|3 years ago