function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Susheel Reddy BSusheel Reddy B 

JavaScript of any type is not allowed to run within the Salesforce.com application context. This includes JavaScript blocks within HomePageComponents, WebLinks, and all other components that are run under the Salesforce.com DOM.

I have onclick JavaScrupt button in Listview and it passes the selected recordid's to VF page. I am using this in Lightening App. When I submitted my app to security review, i got the below response

"JavaScript of any type is not allowed to run within the Salesforce.com application context. This includes JavaScript blocks within HomePageComponents, WebLinks, and all other components that are run under the Salesforce.com DOM."
SandhyaSandhya (Salesforce Developers) 
Hi Susheel Reddy,

Managed packaged apps are first tested by automated scripts from Salesforce.com side, and once found, they flag JS code as possible Cross-Site Scripting vulnerability.

Please refer below posts for more information.

https://www.forcetalks.com/salesforce-topic/my-app-was-rejected-by-salesforce-review-with-error-related-to-javascript/
 
http://www.92.42.51.245.cancer.iwanslphotography.com/nph-p.cgi/20/http/salesforce.stackexchange.com/questions/113447/why-is-security-review-not-passing-app-because-of-weblinks-containing-js-code
 
https://developer.salesforce.com/page/Secure_Coding_Cross_Site_Scripting
 
Hope this helps you!

Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution. 
 
Thanks and Regards
Sandhya