getElementsByClassName is defined in HTML5. From WhatWG:
Tag: HTML
How to get out of frames
One of the methods to break out of frames:
<script type=”text/javascript”>
<!–
if (top.location.href != self.location.href)
top.location.href = self.location.href;
// –>
</script>
<!–
if (top.location.href != self.location.href)
top.location.href = self.location.href;
// –>
</script>