Another question, JS hack or otherwise, is: how can I use JS to set the value of a component prop?
It may seem like a dumb thing to do, but I'm having nothing but issues defaulting BIJC's Calendar component to show a date in a binding, or the type of view to display. It's driving me insane. I figure I can force it in the same way that my focus example works above works...
I myself had been pretty bummed that Ignition didn't support Serial Port communication from the Client PC, but later realized it was mostly a limitation of the browsers.
Now knowing that, I set out to attempt to make use of the Web Serial API of Chromium, using Javascript.
It's a bit unrefined as the Javascript in the OnClick, could be placed in a separate .JS file, but I'll share it as a proof of concept in honor of this thread!
Also, apologies for the params on the View, they could've been in an array, but this was an attempt to try out to make it configurable, as we were trying to make it a base component to use across our projects.
Quick note, as a limitation of the Web Serial API, the requestPort is only allowed on a secure HTTPS connection.
So attempting to use this functionality on an HTTP connection, you'll get the console error in the browser of "Cannot read properties of undefined (reading 'requestPort')"
Thank you very much. The markdown method has been successfully tested, but we were unable to test the global injection method in version 8.3 temporarily. Is there a problem with my method?
Thank you for your replies. In version 8.1, I used: "C:\Program Files\Inductive Automation\Ignition\data\modules\com.inductiveautomation.perspective\injectables" The injection of the "head_top.txt" file into the test was successful, but there were some changes in the file path in version 8.3. I tried to insert it into the path: "C:\Program Files\Inductive Automation\Ignition\data\config\resources\core\com.inductiveautomation.perspective\injectables" Injecting the same "head_top.txt" file into the system did not work. I wonder if there is a problem with my method?
If I had to guess, I'd bet this "injectables" folder got ignored for the 8.3 configuration changes and the path is still data\modules\com.inductiveautomation.perspective\injectables
I'm going to quote this post from Paul here:
Specifically this part:
Anything you do use this for should be considered unsupported.