As the title says, I tried the following to access the tree view form my category_tree.js file in a custom app:
frappe.provide("frappe.pages")
frappe.pages["Tree/Category"].on_page_load = function(wrapper) {
console.log('here');
}
I get the following error frappe.pages[‘Tree/Category’] is undefined