index.html before your scripts. Wait until the host sends the data:
ejg.library.all, ejg.settings,
ejg.profile…) and asynchronous when you have to ask the launcher for something (ejg.game.details(), ejg.explore.search()…).
Library
ejg.library: games, collections and art.Games
ejg.game: the page, launch, favorite, state.Achievements
ejg.game.achievements: list, icons and rarity.Explore and downloads
ejg.explore and ejg.downloads.Community guides
ejg.guides: each game’s Steam guides.Cheats and maps
ejg.trainer and ejg.maps: FLiNG trainers and Map Genie maps.Profile
ejg.profiles: the local profile (name and avatar), switching and editing it.Homebrew
Console games as a store:
createHomebrewView, ejg.catalogs and ejg.emulators.Controller and keyboard
ejg.input and the control hints.Host and window
ejg.ui, ejg.sound, ejg.window, ejg.storage.Events
ejg.on(name, fn) listens for notices from the host:
Each part also has its own
onChange / onState (library, games, downloads…).
Types
The full types are in/_sdk/ejg.d.ts (also inside the installation, at sdk\ejg.d.ts). With
// @ts-check and a reference to that file, your editor autocompletes the whole SDK.
Inside the iframe,
confirm(), alert() and window.open() do not work, and there is no network and no localStorage. See
what a theme can do.
