I want to make a JavaScript-based UWP on VS2017, and I need to be able to set styles by using JavaScript in an SVG onclick event. The only problem
is that VS2017 UWPs don't support changing styles with JavaScript at all. I've tried using all sorts of methods: using the setAttribute() command
and using a dynamically changing styles with style.opacity='1' and style['opacity']='1'.
You can plug the following code into VS2017, and it will not work as intended:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="300" height="300" viewBox="0 0 391 391" xmlns="http://www.w3.org/2000/svg">
<rect id="yeet" x="0" y="0" height="100" width="100" fill="#000000" stroke="#ffffff" opacity="0.5" onclick="yeet.style.opacity='1'" ondblclick="yeet.style.opacity='0.5'"></rect>
</svg>
Nothing seems to work, please help.