mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 15:14:35 +01:00
14 lines
337 B
JavaScript
14 lines
337 B
JavaScript
/**
|
|
* Passes a message through to the React backend.
|
|
* @param type The message type.
|
|
* @param data The message data.
|
|
*/
|
|
function passthrough(type, data) {
|
|
document.dispatchEvent(new CustomEvent('domMessage', {
|
|
type, msg: data
|
|
}))
|
|
}
|
|
|
|
function setConfigValue(key, value) {
|
|
passthrough('updateConfig', {setting: key, value})
|
|
} |