Change user-select with JavaScript

Click the "Try it" button to set the user-select property of the p element to "none":

After you click on the button, it is not possible to select the text of this p element (try to double-click me before and after).