Connect with us

Microsoft

Getting started with Protocol Handlers for your web app

Beginning with Microsoft Edge 96, web apps can now use Protocol Handlers in Microsoft Edge. This is a powerful feature that allows your installed web application (or PWA) to handle pre-set or custom protocols. Installed web applications can now register with the operating system as protocol handlers and launch when a specific protocol is invoked.…

Published

on

Beginning with Microsoft Edge 96, web apps can now use Protocol Handlers in Microsoft Edge. This is a powerful feature that allows your installed web application (or PWA) to handle pre-set or custom protocols. Installed web applications can now register with the operating system as protocol handlers and launch when a specific protocol is invoked. Let’s dive into the feature to understand how developers can take advantage of it.

Typical use cases

Probably the most common protocol that we interact with is the http protocol. When we click on a link that uses this protocol, the system knows to open the web browser and navigate to the address that is specified. Another typical protocol is mailto which allows users to click on email addresses and open the default e-mail client. There are other pre-defined protocols but we can see how this concept of “URL protocol” is useful, since it tells the system about an identifier and how to access the identifier. Protocol handlers allow your web application to participate as the app in these use cases.

Benefits

By having the ability to register as protocol handlers, your web app has better integration with the operating system, and can be set to open specific protocols. It can even be set as a default handler, so if for example, the web app you are building is an email client, you can give your users the option for it to be the default application for creating new e-mails.

Additionally, you can create custom schemes that your web app can handle by registering protocols that are prefixed with web+. This is useful if you require to handle a URL for which the set of safelisted schemes doesn’t fit the bill.

Protocol handlers could be used for web app communication where one app directly invokes another and passes data via custom protocol links.

How-to

To register your installed web application as a protocol handler, you must use the protocol_handlers field in the manifest file. If the protocol_handlers field is present in the manifest, then during installation the web app will be registered as a protocol handler for the protocols specified in the collection.

This field receives a collection of protocol and url pairs. The protocol specifies which scheme to register and the url tells the user agent which resource will process the URI.

Example

As an example we will look at the PWinter PWA. This is an installable web application that allows the user to create custom PWA logos by selecting 3 colors. The application defines the custom web+pwinter:// protocol handler in its manifest file.

“protocol_handlers”: [ { “protocol”: “web+pwinter”, “url”: “index.html?colors=%s” } ]

With this in place and the web app installed on a desktop OS, you can now click on web+pwinter:// links on a website like web+pwinter://3D3D3D-5A0FC8-3D3D3D. This link represents the 3 colors that will be used by the installed web app for each letter. Note the value of the url key must also have a %s substring that will be replaced by the actual resource in the link.

When clicking the link, the browser asks for permission to open the application, and then prompts you to confirm that you want to handle the protocol and the app you’d like to use for it. If you give permission, then the selected application opens with the specified content.

Feature Support

Protocol Handlers are supported in Windows, Linux and Mac, and are shipping in Microsoft Edge 96.  We have contributed this work to the Chromium open-source project and the feature is now available in other Chromium based browsers too!

Related feature

This feature is similar to the JS method navigator.registerProtocolHandler(). It actually uses the same underlying steps, with the main difference being that registerProtocolHandler() is the JavaScript way of registering a website to handle protocols, while the protocol_handlers field in the manifest is the equivalent for installed web applications. On top of this, developers can specify multiple protocols without having to make repeated calls to the same method.

You can learn more about Protocol Handlers with our documentation and the manifest specification.

Protocol handling brings a powerful way to communicate between applications. Let us know how you are using or plan to use the feature, and any feedback you might have that can help us improve on the functionality. You can do so in the feedback tool in Microsoft Edge, or by pressing Alt+Shift+I.

– Diego Gonzalez, Program Manager, Microsoft Edge

Source

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published.

Microsoft

Babylon.js 5.0: Key Engine Advancements – Part 3

Our mission is to create it one of the most powerful, beautiful, and simple web rendering engines in the world. The latest Babylon.js 5.0 engine packs a ton of new improvements to help you create stunning experiences. Unlimited Morph Targets No matter what you call them, Blend Shapes, Shape Keys, or Morph Targets, Babylon.js 5.0 adds…

Published

on

By

Our mission is to create it one of the most powerful, beautiful, and simple web rendering engines in the world. The latest Babylon.js 5.0 engine packs a ton of new improvements to help you create stunning experiences.

Unlimited Morph Targets

No matter what you call them, Blend Shapes, Shape Keys, or Morph Targets, Babylon.js 5.0 adds rocket fuel to your ability to use influenced vertex positions. This new feature now gives you literally unlimited amounts of Morph Targets. Want to have a complex animated face with thousands of Morph Targets to get that perfect expression? Now you can, all in the web, all for free!

See it in action here: Unlimited Morph Targets Demo

Learn more: Unlimited Morph Targets Documentation

YouTube Series: Tech Artist’s Journey YouTube Playlist

Order Independent Transparency

Rendering transparent objects is complicated! The Babylon.js Platform has always strived to make it as easy as possible to help you inform the system of rendering order, alpha index, run depth-prepasses, and much more, so your scene can look correct. With Babylon.js 5.0 we’ve wrapped a bow on it all. All of the complexity of rendering transparent objects can now disappear with one single, simple line of code:

Try it out: Order Independent Transparency Demo

Learn More: Order Independent Transparency Documentation

WebXR Advancements

WebXR is an incredible web standard allowing web developers to create amazing cross-browser XR experiences. Using WebXR to add a mobile AR component to your web site can be a simple and fun way to engage your readers/users even further. While the technology to render world-locked 3D objects has existed in Babylon.js for some time, Babylon.js 5.0 steps the beauty-factor up several notches with the introduction of Light Estimation. This powerful yet easy-to-use new feature allows your Babylon.js scenes to estimate the light in your real-world location and automatically match the lighting and shadows of your virtual world-locked object. This creates a cutting-edge level of immersion between the physical and digital worlds…and it’s all here in Babylon.js…all for free! Babylon.js 5.0 also adds support for WebXR image tracking and WebXR Layers!!!

Check it out on your Android Phone: Light Estimation Demo, Image Tracking Demo

Learn More: Light Estimation Documentation

glTF Updates

The Babylon.js Platform prioritizes support for the absolute latest and greatest advancements to the glTF file format. This means every new version of Babylon.js unlocks new beautiful advancements in rendering capabilities, and Babylon.js 5.0 turns up the heat! With full support for KHR_materials_volume, KHR_materials_transmission, and KHR_materials_ior, you can now render some absolutely STUNNING visuals!

Check it out: KHR_materials_volume Demo

Learn More: KHR_materials_volume, KHR_materials_transmission, KHR_materials_ior

Mixed Reality Toolkit for Babylon.js

Babylon.js 5.0 also adds updated support for the world’s most advanced 3D interface component library, Mixed Reality Toolkit. This advanced library makes it incredibly easy to add advanced XR UX elements into your Babylon.js scenes such as: holographic slates, 3D Sliders, Touch Holographic Buttons, Touch Mesh Buttons, and much much more!

Check it out: MRTK Demo

Learn More: MRTK Documentation

Material Plugin Manager

When it comes to creating real-time shaders power, performance, and flexibility are critical! Babylon.js 5.0 brings introduces a brand new feature that doubles down on all of three. The Material Plugin Manager gives you the ability to add custom code to any Babylon.js shader. This means that you can fully customize any advanced shader, such as PBR, to go even further. The Material Plugin Manager provides developers with the flexibility to fully customize the power, performance, and look of any shader!

Check it out: Material Plugin Manager Demo

Learn More: Material Plugin Manager Documentation

Much Much More

Wow that’s a lot, but that’s only the tip of the iceberg! Improved Shadow Performance, Vertex Animation Textures, a brand-new Build System, there’s more to Babylon.js 5.0 than you can imagine! Want a full view of everything that’s new? For a full list of features, enhancements, and fixes you can head on over here.

Babylon.js 5.0 launches the Babylon.js platform to incredible new heights and we cannot wait to see you reach for the stars with it!

Source

Continue Reading

Microsoft

In their mission to diversify STEM education, twin brothers use Windows 11

Twins Miles and Malik George are almost always in sync. They graduated at the top of their high school class as co-valedictorians. At MIT, these bioengineering students embraced and expanded upon their love of science. They were also in multiple diverse groups on campus such as Nu Delta Fraternity, The Standard, and Laureates and Leaders.…

Published

on

By

Twins Miles and Malik George are almost always in sync.

They graduated at the top of their high school class as co-valedictorians.

At MIT, these bioengineering students embraced and expanded upon their love of science. They were also in multiple diverse groups on campus such as Nu Delta Fraternity, The Standard, and Laureates and Leaders.

This last program is dedicated to helping under-represented students get Ph.D.s or M.D./Ph.D.s and has a selective entry process. The two fondly remembered the program as instrumental in shaping their academic careers.

They worked with MIT Admissions as Admissions Ambassadors to increase the number of underrepresented students that apply to and attend the university. On campus and virtually, they worked in several biological engineering labs. They’re about to graduate and will be pursuing Ph.D.s in Biological Engineering at MIT.


They’re both passionate about bringing STEM (science, technology, engineering and math) to under-served communities through hundreds of funny and informative lessons posted to TikTok and other social media. Their mix of memes, dances and trivia reach all kinds of audiences. They teach what they find exciting about science.

“The more curious you are about one subject, the more you learn about that subject, the more curious you become about everything else,” Miles says. “Curiosity is the reason why people keep innovating. And so as long as people are curious, people will keep learning.”

“Curiosity leads to solutions, you know?” Malik adds.

The brothers will host a private virtual education event for students May 17 in partnership with Microsoft Stores. This session will reach 10,000 students and will feature an inspirational fireside chat, STEM demonstration and interactive Q&A.

The twins strive to be role models for the next generation, to inspire them to follow their dreams.

“In high school we did a lot of science fairs. Being able to count on your hand how many people look like you in a room of over a hundred people, it’s pretty sad,” Malik says. “As we became involved in science ourselves, we wanted to make sure that people saw there are people that look like us in the field and that they can and should feel welcome to do so as well.”

They’re both PC gamers who enjoy comic book universes and socializing with their many friends.

They are part of a tight-knit family, helping their parents with gardening and jigsaw puzzles, watching movies together and doting on the senior Shih-tzu (who is the fifth member of their household).

But they are also individuals.

Malik is the “explainer.” As his brother shares, “He’s going make sure that if he’s telling you about something, you know everything that there is about the topic and he’s going make sure you understand it at the end of the day.”

“If I’m the explainer, then Miles is the convincer,” says Malik. “You know, he can summarize any topic – no matter how advanced – in a couple sentences to any age group and they’ll understand it.”

This works well when they’re doing presentations, which have reached more than 1,000 students remotely (ranging in age from late elementary school to high school seniors) since January 2021. They’ve been getting more interest about K-12 presentations and plan to continue those.

“I’ll do the intro. He does methods and results. I do the conclusion. He gives you the scientific know-how, how to learn. Then I bring it back at the end,” Miles says.

They also have different work styles – though both are also lifetime PC users. For as long as they can remember, they’ve always been on Windows, starting from their childhood.

“If you were to look at my desktop, you will see at least three applications open at once. If you look at Miles’ desktop, you’ll see one application open, but he’ll have three desktops that he’ll switch between,” Malik says.

Multiple desktops are one of Miles’ favorite Windows 11 features.

“I have one program that I’m focused on. When I’m done focusing on it, I’ll switch to another desktop and that’s what I’m working on then,” he says. “Each assignment gets its own desktop, and I will get to it when I get to it.”

They’ve discovered other Windows 11 features that make them even more efficient.

“As a student, I am constantly searching through emails, especially through keyword search,” Malik says. “I globally search by who sent it or a keyword and it will just show up right there. And I can read it or I can click it and reply from the same place. Windows 11 really takes away flipping back and forth between things. And then anything that you don’t have open, you can also just go through the Start menu.”

They also make great use of Snap Assist.

“I can have an essay snap to the right on Word. I can have some internet research article on the left,” Malik says. “And then if I need to check my email, it would just pop up in the center and I don’t have to cover what I was already working on.”

They like that they can tailor Windows 11 to what works best for each of them.

“It really feels like a personalized experience when I’m online. And it really visually is a much better experience than what I’m used to,” Miles says. “As a researcher, I’m used to a lot of diagrams, a lot of graphs. It really combines multitasking with this beautiful element of note taking and annotating directly on the screen.”

Source

Continue Reading

Microsoft

Babylon.js 5.0: News Tools – Part 2

We are artists, developers, creators, and dreamers and we want to make it as simple as possible to enable everyone to bring their ideas to life. With this new version of Babylon.js, we set out to make it even easier to develop thanks to a suite of new and exciting tools. Animation Curve Editor Creating and…

Published

on

By

We are artists, developers, creators, and dreamers and we want to make it as simple as possible to enable everyone to bring their ideas to life. With this new version of Babylon.js, we set out to make it even easier to develop thanks to a suite of new and exciting tools.

Animation Curve Editor

Creating and modifying animation data in a rendering engine can be complicated and verbose, but not anymore! Babylon.js 5.0 adds a built-in Animation Curve Editor (ACE), making it incredibly easy to create and modify animation data directly in your Babylon scene. As with all Babylon.js Platform tools, you can also save your animation data to the Babylon.js Snippet Server and load it back into your Babylon.js scene with one single line of code!

See it in action here: Play with the Animation Curve Editor

Learn more: Animation Curve Editor Documentation

Performance Profiler

Performance is one of the most important things to keep in mind as you create advanced interactive 3D experiences. After all, you don’t want to create an awesome experience that only runs on the most high-end graphics cards, right? You want to create something that EVERYONE can enjoy, and this means keeping track of and optimizing the performance of your scene. Babylon.js 5.0 makes performance debugging and management a breeze with the introduction of the new Performance Profiler. This handy tool allows you to see a real time graph of key performance indicators of your scene, all hooked up live! Make a change, see the impact on perf. It’s really that simple!

See it in action here: Performance Profiler Demo

Learn more: Performance Profiler Documentation

GUI Editor Beta

Babylon.js has a powerful GUI system that offers countless widgets, controls, and properties to help you create rich GUIs. With Babylon.js 5.0 that powerful system becomes far simpler to use with the introduction of the GUI Editor Beta. While still in active development, the GUI Editor Beta is a rich and modern tool, allowing you to create the perfect GUI with a simple and intuitive drag-and-drop interface. Say goodbye to thousands of lines of GUI code and hello to a world of design with the GUI Editor Beta and loading your creations with a single line of code!

See it in action here: GUI Editor Beta Demo

Try it out for yourself: GUI Editor

Learn more: GUI Editor Beta Documentation

New Node Material Nodes

The Node Material Editor is one of the most advanced tools available in the Babylon Platform. One simple UI that helps you generate stunning GLSL shaders with ease. With Babylon.js 5.0 the Node Material gets even better with the introduction of several powerful new nodes!

Check out the new nodes:

Learn More: Node Material Documentation

Asset Librarian

The Babylon.js Platform offers a large library of free Creative Commons 0 assets available for you to use in your Babylon.js scenes, completely for free. With Babylon.js 5.0, accessing these assets is easier and faster than ever! The new Asset Librarian brings a new Assets namespace that you can use in your projects to easily access the 200+ free assets to make your Babylon.js scenes soar.

Try it out: Asset Librarian Demo

Learn More: Asset Librarian Documentation

Dev Stories Documentation

Babylon.js 5.0 adds a whole new category of documentation called “Dev Stories.” These new tutorials are designed to walk you, step-by-step, through some common scenarios that many Babylon.js developers ask about. From setting up a Babylon.js project quickly, adding interactive 3D elements to your e-commerce site, to deploying your Babylon.js project to a Native Application, “Dev Stories” are rich, deep, detailed tutorials aimed at helping you take your project from idea to reality!

Check It Out: Dev Stories!

“Going The Distance With Babylon.js” A New Book               

We are also incredibly excited to share that alongside Babylon.js 5.0, community member and talented author Josh Elster has written an entirely new book about Babylon.js 5.0. Published by Packt Publishing, “Going The Distance With Babylon.js” is written from the mindset of taking you through the entire development process of building a game with Babylon.js from the ground up. We are thrilled to partner with Josh and Packt on this book and think it’ll be a great addition to your library and accelerate your Babylon.js learning journey.

Pick Up Your Copy Here: Babylon.js 5.0: The Book

Beside the tooling, there are also a ton of new features in the engine itself. Check out part three to learn more about the exciting new improvements with Babylon.js 5.0.

Source

Continue Reading

Trending

Copyright © 2021 Today's Digital.