This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 23975e7ace And this seems more correct for the postMessage
implementation with 'Object' typing on the optional transfer argument.
23975e7ace is described below
commit 23975e7acefd8184c6a2ff6bf3542533d813f6bf
Author: greg-dove <[email protected]>
AuthorDate: Mon Feb 23 16:58:57 2026 +1300
And this seems more correct for the postMessage implementation with
'Object' typing on the optional transfer argument.
---
.../HTML/src/main/royale/org/apache/royale/html/elements/Iframe.as | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Iframe.as
b/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Iframe.as
index 5349dd69ab..9524299f94 100644
---
a/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Iframe.as
+++
b/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Iframe.as
@@ -252,8 +252,11 @@ package org.apache.royale.html.elements
{
COMPILE::JS
{
- transfer = transfer || undefined;
-
contentWindow.postMessage(message,targetOrigin,transfer);
+ var transferables:* = undefined;
+ if (transfer) {
+ transferables = Array.isArray(transfer)
? transfer : [transfer];
+ }
+
contentWindow.postMessage(message,targetOrigin,transferables);
}
}