I'm working with a new Open Source library / framework named Photino (cross-platform desktop apps built with HTML5 frontend and .NET core). Github repo is here.
HTML As User Interface
When a Photino application starts, it loads an HTML page which becomes the desktop app's User Interface.
Template Projects
The Photino project provides template projects and the basic one (built with command $ dotnet new photinoapp -o <projname>) contains a index.html page that contains the following script tag:
<script src="app://dynamic.js"></script>
What I've Tried From everything I can tell the project doesn't use this anywhere.
- Searched through source code of entire project.
- Read all Photino documentation.
- Searched web extensively
However, I cannot find any reference to :
- the app:// protocol
- dynamic.js
- anything explaining what this might be
I'm assuming it can just be removed from the project, but I'm curious about what the project template creators might have intended. Have you ever seen this before? Do you know what it is used for?
The
appis being used as a key to set up a protocol handler to your application.From that linked document:
The photino.NET sample
program.cshas below statement.It is the
RegisterCustomSchemeHandlerthat registers the protocol handler using thatappkey.It sets up a callback function that will be called when given
appkey gets found in a page that is being loaded.The source code of RegisterCustomSchemeHandler mentions:
The index.html from that sample has below
scripttag.This triggers the callback, which returns the client side script that you want to get executed for given
scripttag.For above example the
urlargument in(object sender, string scheme, string url, out string contentType)will containapp://dynamic.js.The provided sample ignores the incoming value and just returns a constant/hard-coded script, but you might decide upon returning the content of a file that matches given url.
That part after
app://in ascripttag can be anystringvalue of your choice that might be meaningful for your application.