Title: ReferenceError: on is not defined
Last modified: July 29, 2022

---

# ReferenceError: on is not defined

 *  Resolved [relleenbetts](https://wordpress.org/support/users/relleenbetts/)
 * (@relleenbetts)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/referenceerror-on-is-not-defined/)
 * Hi there!
 * I’ve noticed an error given at the web.dev analysis that’s related to the plugin.
   The particular error, which appears under the “Best practices” section, states
   the following:
    `ReferenceError: on is not defined at https://pruebas.imthemoisturizer.
   com/:215:32`
 * I tried deactivating the plugin and testing the website again and the error disappeared,
   although when the plugin was activated again the error remained.
 * Here’s the piece of code that’s showing the error, as per the developer tools
   of the browser:
 *     ```
       <script id="wpcp_css_disable_selection" type="text/javascript">
           var e = document.getElementsByTagName('body')[0];
           if (e)
           {
               e.setAttribute('unselectable', on);
           }
           </script>
       ```
   
 * I hope this helps find a solution to the issue, thanks a lot in advance!
    -  This topic was modified 3 years, 10 months ago by [relleenbetts](https://wordpress.org/support/users/relleenbetts/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Freferenceerror-on-is-not-defined%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [relleenbetts](https://wordpress.org/support/users/relleenbetts/)
 * (@relleenbetts)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/referenceerror-on-is-not-defined/#post-15880707)
 * Hi! Could you take a look at this?
 *  Plugin Support [Adam Salah](https://wordpress.org/support/users/adam1318/)
 * (@adam1318)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/referenceerror-on-is-not-defined/#post-15881718)
 * Hello, [@relleenbetts](https://wordpress.org/support/users/relleenbetts/)
 * Thank you for your patience.
 * We’re glad to inform you that we have fixed the issue and will push a new update
   soon.
    We’re currently doing some tests on the new update as we care to push 
   a clean update without any issues.
 * Thank you for your understanding.
 * Have a nice day.
 * Regards
 *  Thread Starter [relleenbetts](https://wordpress.org/support/users/relleenbetts/)
 * (@relleenbetts)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/referenceerror-on-is-not-defined/#post-15882087)
 * Hi Adam, thanks a lot for solving it so quick.
 * Have a great day!
 *  Plugin Support [Adam Salah](https://wordpress.org/support/users/adam1318/)
 * (@adam1318)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/referenceerror-on-is-not-defined/#post-15888020)
 * Hello, [@relleenbetts](https://wordpress.org/support/users/relleenbetts/)
 * Thank you for your patience.
 * We have fixed the issue and we push a new version (3.5.1), so kindly update the
   plugin and provide us with your feedback.
 * Thank you and have a lovely day.
 * Regards
 *  Thread Starter [relleenbetts](https://wordpress.org/support/users/relleenbetts/)
 * (@relleenbetts)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/referenceerror-on-is-not-defined/#post-15893306)
 * Hi Adam!
 * I updated to the new version yesterday and have been checking if the issue replicated,
   but everything’s working smoothly.
 * Thanks a lot for your help, have a great day!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘ReferenceError: on is not defined’ is closed to new replies.

 * ![](https://ps.w.org/wp-content-copy-protector/assets/icon-256x256.png?rev=976781)
 * [WP Content Copy Protection & No Right Click](https://wordpress.org/plugins/wp-content-copy-protector/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-content-copy-protector/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-content-copy-protector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-content-copy-protector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-content-copy-protector/reviews/)

## Tags

 * [performance](https://wordpress.org/support/topic-tag/performance/)
 * [ReferenceError](https://wordpress.org/support/topic-tag/referenceerror/)

 * 5 replies
 * 2 participants
 * Last reply from: [relleenbetts](https://wordpress.org/support/users/relleenbetts/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/referenceerror-on-is-not-defined/#post-15893306)
 * Status: resolved