Closed GirkovArpa closed 3 years ago
All the problems mentioned above are tested to work. Likely you're not waiting for the DOM to get ready.
Sciter.js is new and some features are being added by time. I planned to rise an issue about element.style.setProperty but it's available as a string property instead of a function and likely it'll land very soon.
Note: you could still patch document.createElement and replace element.style.setProperty with your own implementation using element.style[propertyName], but pay attention to differences (e.g: backgroundColor instead of background-color)
You're right, I tried document.querySelector('body').style.backgroundColor = 'red';
at the top of the script and it worked.
I'm trying to implement the 7GUIs benchmarks with SciterJS, but I've run into the problem that I can't seem to change the style.
In this code I'm trying to make the input background color red:
I don't understand why
.setAttribute
isn't working since it's marked asimplemented
here.I also tried
input.className = 'date invalid'
but I get the error that there isn't a setter for this property.Is it possible to modify an element's styles in JavaScript using SciterJS yet?