Browse Source

* BroadcastChannel

Michael Van Canneyt 9 months ago
parent
commit
f98aa26b63
1 changed files with 12 additions and 0 deletions
  1. 12 0
      packages/rtl/src/weborworker.pas

+ 12 - 0
packages/rtl/src/weborworker.pas

@@ -1495,6 +1495,18 @@ type
     Property actions : TTJSNotificationActionDynArray Read Factions;
   end;
 
+  { TJSBroadcastChannel }
+
+  TJSBroadcastChannel = class external name 'BroadcastChannel' (TJSEventTarget)
+  private
+    FName: string; external name 'name';
+  public
+    constructor new(aChannel : string);
+    procedure postMessage(aValue : JSValue);
+    procedure close;
+    property name : string Read FName;
+  end;
+
   { --------------------------------------------------------------------
     TJSNotificationEvent
     --------------------------------------------------------------------}