Skip to content

Commit b94229d

Browse files
authored
Adjust events patch for Web Bluetooth (#1412)
The target interface of `advertisementreceived` and `gattserverdisconnected` is a mixin, actual target is `BluetoothDevice`. Also, the events bubble, which wasn't properly captured.
1 parent 1b0627d commit b94229d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/amend-event-data.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,13 @@ const patches = {
447447
change: { targets: ['XMLHttpRequest', 'XMLHttpRequestUpload'] }
448448
}
449449
],
450+
'web-bluetooth': [
451+
{
452+
pattern: { type: /^(advertisementreceived|gattserverdisconnected)$/ },
453+
matched: 2,
454+
change: { targets: ['BluetoothDevice'], bubbles: true }
455+
}
456+
],
450457
'webaudio-1.1': [
451458
{
452459
pattern: { type: 'ended' },

0 commit comments

Comments
 (0)