{"record":{"id":"aca6f05ce3815486","repo":"Semantic-Org/Semantic-UI","slug":"the-method-you-called-is-not-defined-aca6f0","errorCode":null,"errorMessage":"The method you called is not defined","messagePattern":"The method you called is not defined","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/modules/embed.js","lineNumber":619,"sourceCode":"  onDisplay            : function() {},\n  onPlaceholderDisplay : function() {},\n  onReset              : function() {},\n  onCreate             : function(url) {},\n  onEmbed              : function(parameters) {\n    return parameters;\n  },\n\n  metadata    : {\n    id          : 'id',\n    icon        : 'icon',\n    placeholder : 'placeholder',\n    source      : 'source',\n    url         : 'url'\n  },\n\n  error : {\n    noURL  : 'No URL specified',\n    method : 'The method you called is not defined'\n  },\n\n  className : {\n    active : 'active',\n    embed  : 'embed'\n  },\n\n  selector : {\n    embed       : '.embed',\n    placeholder : '.placeholder',\n    icon        : '.icon'\n  },\n\n  sources: {\n    youtube: {\n      name   : 'youtube',\n      type   : 'video',\n      icon   : 'video play',","sourceCodeStart":601,"sourceCodeEnd":637,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/embed.js#L601-L637","documentation":"The embed plugin was invoked with a method string that invoke() could not resolve against the internal module object. Logged via console.error prefixed 'Embed:'; the call returns undefined and does nothing.","triggerScenarios":"Typo in a method name such as $('.ui.embed').embed('destory') (misspelled 'destroy'), or a non-existent method like .embed('setSource'). Valid behaviors include change, create, destroy, reset, show, hide, and dotted get/set accessors.","commonSituations":"Version mismatch where a method was renamed/removed; copy-paste of an API call from another module; wrong camelCase vs dotted form.","solutions":["Check the method spelling against the embed behavior API (change, create, destroy, reset, show, hide, get/set)","For dotted access like 'get.url', ensure both segments name real properties"],"exampleFix":"// before\n$('.ui.embed').embed('chang', 'youtube', 'id');\n// after\n$('.ui.embed').embed('change', 'youtube', '2b2gSrFp8qE');","handlingStrategy":"validation","validationCode":"// Whitelist of public embed behaviors before invoking.\nvar EMBED_METHODS = ['change','create','createEmbed','destroy','reset','show','hide','refresh','get','set'];\nfunction embedMethodOk(name) {\n  var head = String(name).split(/[\\. ]/)[0];\n  return EMBED_METHODS.indexOf(head) !== -1;\n}\n// usage\nif (embedMethodOk(method)) $('.ui.embed').embed(method);","typeGuard":"function isEmbedMethod(name) {\n  return typeof name === 'string'\n    && /^(change|create|createEmbed|destroy|reset|show|hide|refresh|get(\\.[a-z]+)?|set(\\.[a-z]+)?)$/.test(name);\n}","tryCatchPattern":null,"preventionTips":["Cross-check method names against the current Semantic UI version's behavior API","Use dotted accessors exactly as documented (e.g. 'get.url')","Add a unit test that calls every behavior you depend on so typos surface in CI, not in the browser"],"tags":["embed","semantic-ui","api-misuse","typo"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}