Semantic-Org/Semantic-UI · warning
The method you called is not defined
Error message
The method you called is not defined
What it means
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.
Source
Thrown at src/definitions/modules/embed.js:619
onDisplay : function() {},
onPlaceholderDisplay : function() {},
onReset : function() {},
onCreate : function(url) {},
onEmbed : function(parameters) {
return parameters;
},
metadata : {
id : 'id',
icon : 'icon',
placeholder : 'placeholder',
source : 'source',
url : 'url'
},
error : {
noURL : 'No URL specified',
method : 'The method you called is not defined'
},
className : {
active : 'active',
embed : 'embed'
},
selector : {
embed : '.embed',
placeholder : '.placeholder',
icon : '.icon'
},
sources: {
youtube: {
name : 'youtube',
type : 'video',
icon : 'video play',View on GitHub (pinned to 597843ab84)
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
Example fix
// before
$('.ui.embed').embed('chang', 'youtube', 'id');
// after
$('.ui.embed').embed('change', 'youtube', '2b2gSrFp8qE'); Defensive patterns
Strategy: validation
Validate before calling
// Whitelist of public embed behaviors before invoking.
var EMBED_METHODS = ['change','create','createEmbed','destroy','reset','show','hide','refresh','get','set'];
function embedMethodOk(name) {
var head = String(name).split(/[\. ]/)[0];
return EMBED_METHODS.indexOf(head) !== -1;
}
// usage
if (embedMethodOk(method)) $('.ui.embed').embed(method); Type guard
function isEmbedMethod(name) {
return typeof name === 'string'
&& /^(change|create|createEmbed|destroy|reset|show|hide|refresh|get(\.[a-z]+)?|set(\.[a-z]+)?)$/.test(name);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Version mismatch where a method was renamed/removed; copy-paste of an API call from another module; wrong camelCase vs dotted form.
Related errors
- The method you called is not defined.
- The method you called is not defined
- {name} cannot contain "{ruleValue}"
- The method you called is not defined.
- The method you called is not defined.
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/aca6f05ce3815486.
Report an issue: GitHub.