mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Allow the embedded games platform to ask for opening external urls
Don't show in changelog
This commit is contained in:
@@ -365,6 +365,16 @@ const GamesPlatformFrameStateProvider = ({
|
||||
console.error('Error while sending GGM command:', error);
|
||||
}
|
||||
}
|
||||
if (event.data.id === 'openExternalUrl') {
|
||||
if (typeof event.data.url !== 'string') {
|
||||
console.warn(
|
||||
'Received an invalid URL to open from the games platform:',
|
||||
event.data
|
||||
);
|
||||
return;
|
||||
}
|
||||
Window.openExternalURL(event.data.url);
|
||||
}
|
||||
},
|
||||
[
|
||||
openUserPublicProfile,
|
||||
|
Reference in New Issue
Block a user