@@ -74,18 +74,18 @@ pub const MessagePort = struct {
7474 onmessageerror_cbk : ? js.Function = null ,
7575 // This is the queue of messages to dispatch to THIS MessagePort when the
7676 // MessagePort is started.
77- queue : std .ArrayListUnmanaged (js .JsObject ) = .empty ,
77+ queue : std .ArrayListUnmanaged (js .Object ) = .empty ,
7878
7979 pub const PostMessageOption = union (enum ) {
80- transfer : js.JsObject ,
80+ transfer : js.Object ,
8181 options : Opts ,
8282
8383 pub const Opts = struct {
84- transfer : js.JsObject ,
84+ transfer : js.Object ,
8585 };
8686 };
8787
88- pub fn _postMessage (self : * MessagePort , obj : js.JsObject , opts_ : ? PostMessageOption , page : * Page ) ! void {
88+ pub fn _postMessage (self : * MessagePort , obj : js.Object , opts_ : ? PostMessageOption , page : * Page ) ! void {
8989 if (self .closed ) {
9090 return ;
9191 }
@@ -150,7 +150,7 @@ pub const MessagePort = struct {
150150
151151 // called from our pair. If port1.postMessage("x") is called, then this
152152 // will be called on port2.
153- fn dispatchOrQueue (self : * MessagePort , obj : js.JsObject , arena : Allocator ) ! void {
153+ fn dispatchOrQueue (self : * MessagePort , obj : js.Object , arena : Allocator ) ! void {
154154 // our pair should have checked this already
155155 std .debug .assert (self .closed == false );
156156
@@ -165,7 +165,7 @@ pub const MessagePort = struct {
165165 return self .queue .append (arena , try obj .persist ());
166166 }
167167
168- fn dispatch (self : * MessagePort , obj : js.JsObject ) ! void {
168+ fn dispatch (self : * MessagePort , obj : js.Object ) ! void {
169169 // obj is already persisted, don't use `MessageEvent.constructor`, but
170170 // go directly to `init`, which assumes persisted objects.
171171 var evt = try MessageEvent .init (.{ .data = obj });
@@ -205,12 +205,12 @@ pub const MessageEvent = struct {
205205 pub const union_make_copy = true ;
206206
207207 proto : parser.Event ,
208- data : ? js.JsObject ,
208+ data : ? js.Object ,
209209
210210 // You would think if port1 sends to port2, the source would be port2
211211 // (which is how I read the documentation), but it appears to always be
212212 // null. It can always be set explicitly via the constructor;
213- source : ? js.JsObject ,
213+ source : ? js.Object ,
214214
215215 origin : []const u8 ,
216216
@@ -224,8 +224,8 @@ pub const MessageEvent = struct {
224224 ports : []* MessagePort ,
225225
226226 const Options = struct {
227- data : ? js.JsObject = null ,
228- source : ? js.JsObject = null ,
227+ data : ? js.Object = null ,
228+ source : ? js.Object = null ,
229229 origin : []const u8 = "" ,
230230 lastEventId : []const u8 = "" ,
231231 ports : []* MessagePort = &.{},
@@ -241,7 +241,7 @@ pub const MessageEvent = struct {
241241 });
242242 }
243243
244- // This is like "constructor", but it assumes js.JsObjects have already been
244+ // This is like "constructor", but it assumes js.Objects have already been
245245 // persisted. Necessary because this `new MessageEvent()` can be called
246246 // directly from JS OR from a port.postMessage. In the latter case, data
247247 // may have already been persisted (as it might need to be queued);
@@ -261,15 +261,15 @@ pub const MessageEvent = struct {
261261 };
262262 }
263263
264- pub fn get_data (self : * const MessageEvent ) ! ? js.JsObject {
264+ pub fn get_data (self : * const MessageEvent ) ! ? js.Object {
265265 return self .data ;
266266 }
267267
268268 pub fn get_origin (self : * const MessageEvent ) []const u8 {
269269 return self .origin ;
270270 }
271271
272- pub fn get_source (self : * const MessageEvent ) ? js.JsObject {
272+ pub fn get_source (self : * const MessageEvent ) ? js.Object {
273273 return self .source ;
274274 }
275275
0 commit comments