Skip to content

Commit c562604

Browse files
committed
Add a comment to explain origin update
1 parent 981925c commit c562604

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/consumer/frame.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,10 @@ class Frame extends EventEmitter {
198198
// 2. Identify the app the message came from.
199199
if (this.iframe.contentWindow !== event.source) return;
200200

201-
// For Chrome, the origin property is in the event.originalEvent object
201+
// For Chrome, the origin property is in the event.originalEvent object.
202+
// Update origin so it can be used to post back to this frame.
202203
this.origin = event.origin || event.originalEvent.origin;
203-
204+
204205
logger.log('<< consumer', event.origin, event.data);
205206

206207
// 3. Send a response, if any, back to the app.

0 commit comments

Comments
 (0)