Skip to Content

Configuration

TaskOnEmbed is initialized with TaskOnEmbedConfig.

new TaskOnEmbed(config: TaskOnEmbedConfig);

TaskOnEmbedConfig

FieldTypeRequiredDescription
baseUrlstringYesBase URL of TaskOn service (for example https://taskon.xyz)
containerElementstring | HTMLElementYesCSS selector or actual container element
widthstring | numberNoIframe width (default: 100%)
heightstring | numberNoIframe height (default: 100%)
languagestringNoInitial language (en, ko, ru, es, ja, etc.)
isDevbooleanNoDevelopment OAuth mode switch
tabsIncludeCommunityTabKey[]NoWhitelist visible tabs (higher priority than tabsExclude)
tabsExcludeCommunityTabKey[]NoBlacklist hidden tabs

baseUrl Input Rules

baseUrl supports both full URLs and host-only values.

  • Full URL: https://taskon.xyz
  • Host only: taskon.xyz (auto-resolved to https://taskon.xyz/)
  • Local host: localhost:5173 (auto-resolved to http://localhost:5173/)

Protocol rules:

  • Local hosts (localhost, 127.0.0.1, [::1], 0.0.0.0) default to http://
  • Non-local hosts default to https://
  • Only http:// and https:// are supported

Examples:

new TaskOnEmbed({ baseUrl: "taskon.xyz", containerElement: "#taskon-embed", }); new TaskOnEmbed({ baseUrl: "localhost:5173", containerElement: "#taskon-embed", });

CommunityTabKey

Supported tab keys:

  • home
  • quests
  • leaderboard
  • incentives
  • benefit
  • wheelOfFortune
  • events
  • milestone

Tab Visibility Examples

const embed = new TaskOnEmbed({ baseUrl: "https://your_embed_domain.com", containerElement: "#taskon-embed", tabsInclude: ["home", "quests", "leaderboard"], });
const embed = new TaskOnEmbed({ baseUrl: "https://your_embed_domain.com", containerElement: "#taskon-embed", tabsExclude: ["benefit", "wheelOfFortune"], });

When both are provided, tabsInclude takes precedence.

Size Strategy

  • Use width: "100%" for responsive layouts
  • Prefer explicit height (for example height: "700px") for stable rendering
  • You can change size later with updateSize() (see Methods)
Last updated on