Created
May 14, 2018 15:53
-
-
Save JamesDBartlett3/2cbe8dcd999f4e51bc14d03544c11b1f to your computer and use it in GitHub Desktop.
Colorized .querySelect() & .getElementsByClass() Examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="50" id="getelements"> | |
<text font-size="16" x="10" y="20"> | |
document.getElementsByClassName(<tspan fill="red">\'red test\'</tspan>); | |
</text> | |
</svg> | |
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="50" id="queryselector"> | |
<text font-size="16" x="10" y="20"> | |
document.querySelector(\"<tspan fill="red">div.user-panel.main</tspan> input[name=\'login\']\"); | |
</text> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment