-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Advanced Usage of Pake
-
Start the debugging mode by using
npm run dev
and open thedevtools
by right-clicking. Find the name of the style you want to modify and verify the effect in thedevtools
first. -
Locate the style position in
src-tauri/src/inject/style.js
by using the variableconst css = /* styles */
, and write the style you want to override into thecss
variable. You can use this file as an example. example
Refer to the event listener in src-tauri/src/inject/event.js
with document.addEventListener
, and write it directly, it's more of a basic front-end technique here.
example
3. How to communicate with Pake about events in containers, such as dragging and dropping, scrolling, special clicks on the Web, etc.?
Refer to the communication code in index.js
with invoke
, write the event listener and then use invoke
to pass the event and its parameters, then refer to the container to receive events invoke_handler
and handle them yourself.