{"record":{"id":"3e24490564cfcb10","repo":"Semantic-Org/Semantic-UI","slug":"ontabinit-has-been-renamed-to-onfirstload-in-2-0","errorCode":null,"errorMessage":"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.","messagePattern":"onTabInit has been renamed to onFirstLoad in 2\\.0, please adjust your code\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/definitions/modules/tab.js","lineNumber":929,"sourceCode":"  evaluateScripts : 'once',     // whether inline scripts should be parsed (true/false/once). Once will not re-evaluate on cached content\n\n  onFirstLoad : function(tabPath, parameterArray, historyEvent) {}, // called first time loaded\n  onLoad      : function(tabPath, parameterArray, historyEvent) {}, // called on every load\n  onVisible   : function(tabPath, parameterArray, historyEvent) {}, // called every time tab visible\n  onRequest   : function(tabPath, parameterArray, historyEvent) {}, // called ever time a tab beings loading remote content\n\n  templates : {\n    determineTitle: function(tabArray) {} // returns page title for path\n  },\n\n  error: {\n    api        : 'You attempted to load content without API module',\n    method     : 'The method you called is not defined',\n    missingTab : 'Activated tab cannot be found. Tabs are case-sensitive.',\n    noContent  : 'The tab you specified is missing a content url.',\n    path       : 'History enabled, but no path was specified',\n    recursion  : 'Max recursive depth reached',\n    legacyInit : 'onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.',\n    legacyLoad : 'onTabLoad has been renamed to onLoad in 2.0. Please adjust your code',\n    state      : 'History requires Asual\\'s Address library <https://github.com/asual/jquery-address>'\n  },\n\n  metadata : {\n    tab    : 'tab',\n    loaded : 'loaded',\n    promise: 'promise'\n  },\n\n  className   : {\n    loading : 'loading',\n    active  : 'active'\n  },\n\n  selector    : {\n    tabs : '.ui.tab',\n    ui   : '.ui'","sourceCodeStart":911,"sourceCodeEnd":947,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/tab.js#L911-L947","documentation":"Semantic UI Tab deprecation notice logged at tab.js:172 by fix.callbacks(): if parameters.onTabInit is detected, it is renamed to parameters.onFirstLoad (the 2.x name), the legacy key is deleted, and this message is emitted. The migration is automatic; the message exists to push developers onto the new API.","triggerScenarios":"Initializing tab with the 1.x callback name: $('.menu .item').tab({ onTabInit: function(){...} }).","commonSituations":"Code from Semantic UI 1.x examples; legacy CMS templates; documentation predating the 2.0 rename.","solutions":["Rename onTabInit to onFirstLoad in the tab settings object.","Remove the now-deprecated key once the rename is in place.","Update any documentation/comments referencing the old name."],"exampleFix":"// before\n$('.menu .item').tab({ onTabInit: function(path, params, evt){ /*...*/ } });\n// after\n$('.menu .item').tab({ onFirstLoad: function(path, params, evt){ /*...*/ } });","handlingStrategy":"validation","validationCode":"function migrateTabCallbacks(cfg) {\n  if (cfg && cfg.onTabInit) { console.warn('Rename onTabInit -> onFirstLoad'); cfg.onFirstLoad = cfg.onTabInit; delete cfg.onTabInit; }\n  return cfg;\n}","typeGuard":"function usesModernTabInitName(cfg) { return !cfg || typeof cfg.onTabInit === 'undefined'; }","tryCatchPattern":null,"preventionTips":["Search the codebase for 'onTabInit' during Semantic UI upgrades.","Update shared templates and docs to the 2.x names."],"tags":["semantic-ui","deprecation","migration","tab"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}