2

I need to change a property, which starts with -webkit-(and the other browser-specific statements), in Javascript. All of them start with dash. How am i supposed to write this?

In particular, the thing i need is -webkit-user-select. I know it should be something like webkitUserSelect, but no idea of what exactly.

Thanks

1
  • (The name of the real post, of which this one is duplicate, is not ment to be searched for) Commented Oct 9, 2015 at 12:08

1 Answer 1

3

Just like you write any property that can't be used with dot notation:

element.style['-webkit-user-select'] = 'none';
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.