Closed Psychokiller1888 closed 1 year ago
The plugin has a weird configuration. It pretends to be a HTML element, like a button or text input, but it's clearly not that as it's also a single-global plugin that only has one instance in the project and does not have any position or size (which all HTML elements do have).
I tried fixing the initial error, but then another error happened instead, also relating to the fact Construct is trying to use it as a HTML element. I can only conclude the plugin is misconfigured - the addon developer will need to fix it.
Yes, and that's the question... How do you have a single global plugin be able to communicate to the dom side that is using an API....
There's a domMessagingPlugin sample in the addon SDK download. Any plugin can use DOM messaging methods to communicate with a DOM-side script. There is no need to try to pretend the plugin is a HTML element.
Problem description
CreateElement fails with a JS error
Attach a .c3p
Try this plugin and run any empty project https://github.com/AirConsole/airconsole-construct3/blob/1.8.0.0/airconsole.c3addon
Steps to reproduce
Observed result
Expected result
Well, at least an explanation of what is awaited.... What should be visible? Thee docs don't mention anything about this
More details
Affected browsers/platforms:
First affected release: No idea, first time using SDKDOMInstance
System details
View details
``` sdkDOMInstanceBase.js:4 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'IsVisible') at AirConsoleInstance.CreateElement (sdkDOMInstanceBase.js:4:247) at new AirConsoleInstance (5502d4cd-5abc-4cc4-a5ee-e6a1d7085cf1:25:8) at C3.New (jsutil.js:15:47) at Instance._CreateSdkInstance (instance.js:7:189) at ObjectClass._CreateSingleGlobalInstance (objectClass.js:13:454) at new ObjectClass (objectClass.js:8:314) at C3.New (jsutil.js:15:47) at ObjectClass.Create (objectClass.js:8:404) at C3Runtime._LoadDataJson (runtime.js:30:342) at C3Runtime.Init (runtime.js:21:462) ```