Comments (15)
I will definitely need more info to help.Can you commit your code in a temporary branch?
from vorlonjs.
@deltakosh I just pushed it to the components branch
from vorlonjs.
Here is the line that throws: https://github.com/MicrosoftDX/Vorlonjs/blob/components/Plugins/Vorlon/plugins/domExplorer/vorlon.domExplorer.ts#L220
from vorlonjs.
@deltakosh I am adding a listener to handle refresh
events thrown from within the DOM Explorer's DOM tree panel. It appears that something is taking issue with a Plugin's function being invoked from inside an event handler.
Is there some form of custom, object-checking/locking CSP that the project or TypeScript employs to prevent this?
from vorlonjs.
Not to my knowledge:(
from vorlonjs.
Warning there is a misunderstanding here: the refresh function does not exist dashboard side. You have to send a refresh message to the client side of the plugin.
from vorlonjs.
Like this:
Core.Messenger.sendRealtimeMessage(this.getID(), { type: "refresh" }, RuntimeSide.Dashboard);
And then you have to update this function:
https://github.com/MicrosoftDX/Vorlonjs/blob/components/Plugins/Vorlon/plugins/domExplorer/vorlon.domExplorer.ts#L188
in order to add a "refresh" case
Does it make sense?
from vorlonjs.
@deltakosh this event is not coming from the client, it is coming from the dashboard's own UI/elements. If you log this.refresh
in the scope of that event handler it clearly exists.
Why would a Plugin be charged with creating its own dashboard UI and have no access to its own public/private functions? I don't understand that aspect, can you clarify?
from vorlonjs.
@deltakosh you said this in the comment above: "Warning there is a misunderstanding here: the refresh function does not exist dashboard side", but then how come I can log the function and execute it? A security warning makes me thing the object is protected in some way. If the function didn't exist, wouldn't that handler immediately throw undefined when binding/calling it?
from vorlonjs.
Actually it exists as the same code is executed on the client and on the dashboard. But the dashboard is not executed on the device, so there is no reason to execute refresh() function dashboard side. Right?
You need to use the messenger as I shown before to send a message to the client part of the plugin in order to execute refresh on the device
from vorlonjs.
I mean: the click will happen on the dashboard, the dashboard is gonna use the messenger to send a message to the client, the client will receive the message, process it and resend the result back to the dashboard
from vorlonjs.
@deltakosh hmm, ok, I thought refresh()
was the function that performed that flow (sending a message to the client and grabbing latest). I will take another look.
from vorlonjs.
Ok I understand so :)
from vorlonjs.
@deltakosh got it working, thanks for the clarification :)
from vorlonjs.
My pleasure my friend
from vorlonjs.
Related Issues (20)
- Firefox - Lebowskilebowski HOT 2
- https support
- VorlonJS desktop sudden crashes
- not fully HTTPS support, have request also in HTTP
- Fails to install on a Mac due to error with dependency phantomjs (prebuilt) HOT 6
- Release new version? HOT 2
- Waiting for socket.io to load... HOT 1
- Repeating Console Message
- Add other config options via env vars
- [bug] Uncaught DOMException: Failed to read the 'rules' property from 'CSSStyleSheet': Cannot access rules HOT 1
- probeerror:Error:websocketerror while debugging a website
- Shadow Dom?
- Debugging Outlook Add-in on Android HOT 3
- How can I write a log file in hard disk?
- After the network is disconnected, there is no reconnection.
- Proxy page redirects to invalid page for SPAs
- SSL proxy always returns cannot get
- xhrPanel auto start
- Is it an abandoned project? HOT 2
- how to show content panel like normal page driven by DOM panel in dashboard?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vorlonjs.