createGameSnacks function

  • The createGameSnacks function creates an embedded GameSnacks Game Center.

  • It requires an IFrame element or ID and the ID of the game center to embed.

  • An optional game ID can be provided to embed a specific game.

  • The function returns a GameSnacks object.

Creates an embedded GameSnacks Game Center.

Signature

function createGameSnacks(iframe: HTMLIFrameElement | string, gameCenterId: string, gameId?: string): GameSnacks;

Parameters

Name Type Optional Description
iframe HTMLIFrameElement | string No The IFrame element or ID to use for the GameSnacks embed.
gameCenterId string No The ID of the game center to embed.
gameId string Yes Optional ID of the specific game to embed.

Returns

GameSnacks