Comments (4)
WebView sending "Jason" to parent app, could probably trigger new view and same flow; Doing a data messaging back and forth would need a different approach.
from documentation.
@copongcopong great point, I was thinking about just starting out with implementing actions. It's still just idea stage though. Trying to think of some critical use cases.
from documentation.
I will be watching this issue, as I mentioned this is pretty useful for me - but I agree that use cases should be critical, will let you know if I know some very specific ones (too late at night to think about that right now :)). Checking out the other issues now to see if there is something that I can help out with over the weekend.
from documentation.
This feature is coming soon. Just updating here with a bit of more info on how it's implemented so we can document it:
This feature allows a web container to reach outside of its own sandbox and call its parent Jasonette native app's JASON actions, simply by calling:
JASON.call(/****JASON ACTION****/)
from its javascript. You just need to pass the same action JSON as an argument. Here's an example:
{
"type": "html",
"text": "<html><script>var t= {name: 'cat'}; JASON.call({trigger:\"add\",options:t})</script></html>"
}
Another example:
{
"type": "html",
"text": "<html><script>JASON.call({type:\"$util.alert\",options:{title: 'alert', description: 'this is an alert'}})</script></html>"
}
This is part 1 of the full IPC architecture as it addresses only the webcontainer ==> Jasonette
direction communication.
The part 2, which is the opposite direction (Jasonette ==> web container
), is much more complicated and involves introduction of multiple APIs since it needs ways to describe how to:
- Identify each web container component with a unique identifier
- Keep track of all the web containers that can be messaged
- Dispatch a Javascript function call to only the intended web container
Part 1 is already useful for many cases and it looks like Part 2 will take some time to figure out, which is why it's broken down into two parts. The part 2 will be a separate PR.
from documentation.
Related Issues (20)
- action for pin selected on map component HOT 2
- Add connection type to $env HOT 2
- #each with index
- Call JS functions inside web containers from the parent app
- Clarify inline action vs regsitry based trigger gotcha
- Keyboard type HOT 8
- support file url in $network.upload
- Label component styling HOT 1
- Add body.style.align to documentation + more options
- Custom Events (push notification, websocket, geolocation, etc) HOT 3
- Event Logger HOT 8
- add core UI component for on-off (boolean) component
- [Request] Add ios and android attribute to options HOT 1
- Error: no implicit conversion of String into Integer HOT 2
- Errata in $util.datepicker actions documentation, formatting
- Dead link HOT 2
- Search for text on a website
- Porting 32-bit code to 64-bit
- Project Status
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 documentation.