This is seemingly a duplicate, but read on for it is not quite so... I think... :) I have followed the answer here: How do I disable text selection with CSS or JavaScript? with a twist. I want to disable the selection programmatically for certain fields, and I do that in Chrome with:
node.style.webkitUserSelect="none";
Which works fine. However, I tried the following for Firefox:
node.style.mozUserSelect="none";
But this doesn't work. I haven't tried with any other browser. Is there a different way to do this? And is it a "documented standard" that all CSS rules like this:
.rule {
some-css-selector: value;
}
is translatable to JavaScript like the following?
node.style.someCssSelector="value";
Or is it just luck that it happens to work in some cases?