More Cool API Ideas

The new progressive web app ideas that browser developers have are pretty cool. But I think there are a few APIs that the web would be way cooler with. This is the second post out of a series of posts

4. Widget API

Some platforms, mostly phones have widgets that you can place on your home screen. What if websites could create them? Example:

title: "Current Time",
color: "#ee8800",
content: [
{type: "updatingText",key:"getTime"},
{type: "button",label: "Open website",key:"openSite"}
},function (res){
if(res.type === "getTime"){return time}else if(res.type === "openSite"){"")}

5. Document Print API

Somehow, Google Docs is able to print only part of the page, in this case, the document. This would make it much easier!! Example:


<p>This will print only part of the page.</p>
<p id="print">I will get printed!!</p>


window.print(document.getElementById("print"),{doubleSided: false, sheets: 1, color: true});
Written on December 14, 2017

In the categories:

api ideas

View all my posts: somerandomcharactersthatwillgetpickedupbysearchengines