Skip to content

Commit

Permalink
feat: Updated plugin support for better webkit modding.
Browse files Browse the repository at this point in the history
  • Loading branch information
shdwmtr committed Dec 1, 2024
1 parent 8fe2a55 commit 1a8daf0
Show file tree
Hide file tree
Showing 9 changed files with 2,181 additions and 166 deletions.
2 changes: 1 addition & 1 deletion examples/plugin/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def receive_frontend_message(message: str, status: bool, count: int):
if count == 69:
return True
else:
return
return False

def get_steam_path():
logger.log("getting steam path")
Expand Down
2 changes: 1 addition & 1 deletion examples/plugin/frontend/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function windowCreated(context: object)
}

// Declare a function that exists on the backend
const backendMethod = callable<[{ message: string, status: boolean, count: number }]>('Backend.receive_frontend_message')
const backendMethod = callable<[{ message: string, status: boolean, count: number }], boolean>('Backend.receive_frontend_message')

// Entry point on the front end of your plugin
export default async function PluginMain() {
Expand Down
9 changes: 9 additions & 0 deletions examples/plugin/frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"jsxFactory": "window.SP_REACT.createElement",
"jsxFragmentFactory": "window.SP_REACT.Fragment",
},
"include": ["."],
"exclude": ["node_modules", "../webkit"],
}
Loading

0 comments on commit 1a8daf0

Please sign in to comment.