Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
Technical Personnal Blog

Technical Personnal Blog

Technical Personnal Blog

Technical Personnal Blog

  • Tech
  • Blog
  • Open Source
  • VEGAS
  • CARD
  • Favorite Link
  • Shop
  • Cart
  • Checkout
  • My account
  • Tech
  • Blog
  • Open Source
  • VEGAS
  • CARD
  • Favorite Link
  • Shop
  • Cart
  • Checkout
  • My account
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
Uncategorized

Quick Tip: Make a Chrome App Shortcut For Any Web App

By techsupport
October 20, 2017 2 Min Read
Comments Off on Quick Tip: Make a Chrome App Shortcut For Any Web App

more

Create Your First App

This tutorial walks you through creating your first Chrome App. Chrome Apps are structured similarly to extensions so current developers will recognize the manifest and packaging methods. When you’re done, you’ll just need to produce a zip file of your code and assets in order to publish your app.

A Chrome App contains these components:

  • The manifest tells Chrome about your app, what it is, how to launch it and the extra permissions that it requires.
  • The background script is used to create the event page responsible for managing the app life cycle.
  • All code must be included in the Chrome App package. This includes HTML, JS, CSS and Native Client modules.
  • All icons and other assets must be included in the package as well.

API Samples: Want to play with the code? Check out the hello-world sample.

Step 1: Create the manifest

First create your manifest.json file (Formats: Manifest Files describes this manifest in detail):

{
  "name": "Hello World!",
  "description": "My first Chrome App.",
  "version": "0.1",
  "manifest_version": 2,
  "app": {
    "background": {
      "scripts": ["background.js"]
    }
  },
  "icons": { "16": "calculator-16.png", "128": "calculator-128.png" }
}

Important: Chrome Apps must use manifest version 2.

Step 2: Create the background script

Next create a new file called background.js with the following content:

chrome.app.runtime.onLaunched.addListener(function() {
  chrome.app.window.create('window.html', {
    'outerBounds': {
      'width': 400,
      'height': 500
    }
  });
});

In the above sample code, the onLaunched event will be fired when the user starts the app. It then immediately opens a window for the app of the specified width and height. Your background script may contain additional listeners, windows, post messages, and launch data, all of which are used by the event page to manage the app.

Step 3: Create a window page

Create your window.html file:

<!DOCTYPE html>
<html>
  <head>
  </head>
  <bodyhttps://developer.chrome.com/apps/first_app
Author

techsupport

Follow Me
Other Articles
Previous

구글 검색 상위 노출을 위한 200가지 팁

Next

Python IDE: The10 Best IDEs for Python Programmers

Categories

  • Android
  • Blog
  • Favorite Link
  • linux
  • Open Source
  • opencart
  • social
  • Tech
  • Uncategorized

Archives

  • January 2025
  • March 2024
  • August 2023
  • March 2023
  • February 2023
  • November 2021
  • August 2021
  • April 2021
  • March 2021
  • December 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • May 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • August 2019
  • June 2019
  • October 2018
  • August 2018
  • May 2018
  • April 2018
  • March 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • June 2017
  • March 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • January 2016
  • December 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
Copyright 2026 — Technical Personnal Blog. All rights reserved. Blogsy WordPress Theme