How to access the tree view page from js?

As the title says, I tried the following to access the tree view form my category_tree.js file in a custom app:

frappe.pages["Tree/Category"].on_page_load = function(wrapper) {

I get the following error frappe.pages[‘Tree/Category’] is undefined

Hi @nabil_chaabane,

I think you should check it.

I hope this helps.
Thank You!