You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/Migration/0.14-to-0.15-alpha.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,4 +165,28 @@ pub enum Recipients {
165
165
}
166
166
```
167
167
168
-
This aligns with how scripts are associated with contexts better.
168
+
This aligns with how scripts are associated with contexts better.
169
+
170
+
## `ScriptCallbackEvent` changes
171
+
172
+
The language for recipients is now controlled through the `language` field of the `ScriptCallbackEvent`. This allows for more flexibility in how callbacks are handled, especially when multiple languages are involved.
173
+
174
+
If no language is specified, the callback will apply to all languages.
175
+
176
+
```diff,ignore
177
+
#[derive(Clone, Event, Debug)]
178
+
#[non_exhaustive]
179
+
pub struct ScriptCallbackEvent {
180
+
/// The label of the callback
181
+
pub label: CallbackLabel,
182
+
/// The recipients of the callback
183
+
pub recipients: Recipients,
184
+
/// The language of the callback, if unspecified will apply to all languages
185
+
-
186
+
+ pub language: Option<Language>
187
+
/// The arguments to the callback
188
+
pub args: Vec<ScriptValue>,
189
+
/// Whether the callback should emit a response event
0 commit comments