Enable `frappe.call()` and `frappe.boot` in Page Components
- Dominant language
- Vue
- Stars
- 280
- Forks
- 98
- Avg merge
- 1d 30m
- Merged PRs (30d)
- 11
Description
#### Problem
Currently, `frappe.call()` and `window.frappe` are not available in page components, especially within the `run_script` method. This limits the ability to make server-side calls or access boot information directly from component events.
#### Suggestion
Please expose `frappe.call()` and `frappe.boot` to the frontend environment within page components. Making these available inside component event scripts (like `run_script`) would allow:
- Direct backend API calls
- Access to session, user, and system context (`frappe.boot`)
- Easier integration of dynamic data
#### Benefit
This enhancement would make it easier for developers to build dynamic, data-driven components without extra workarounds. It aligns better with the standard Frappe development experience.
Thanks for considering this!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how page components execute component event scripts, especially the run_script method, and where the frontend environment is assembled. Verify how window.frappe is currently exposed, then make frappe.call() and frappe.boot available to those scripts. Done means component events can make backend calls and read boot information without workarounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100