상세 컨텐츠

본문 제목

How To Run A Chrome App Mac

카테고리 없음

by cevireces1987 2021. 5. 16. 13:52

본문

App

On a Mac, just hold down the option key when booting up and you'll be given a choice of which device to use to boot your Mac. Here's how to run Chrome OS from a USB stick via CloudReady: Select a computer that you want to use with CloudReady. Download an app. Next, you need to find an app that you’d like to run in your Chrome browser. You can obtain a.apk app file a variety of ways, but the most common would probably be through a. I had a near nasty experience with the dreaded MacKeeper as a result of a Chrome extention. I would gently suggest you feed 'Problems with Chrome' into Google and read the results. True, all browsers have their problems but Chrome seems to have more than most. Perhaps it is the close ties to Google itself. Press 'command' + 'option' + 'esc' on your keyboard. A window will appear called 'Force Quit Applications.' Look for Google Chrome. If Chrome is there, select it and then click. If an app on your Mac stops responding and you can't quit the app normally, use Force Quit to close the app. To quit (close) a Mac app normally, choose Quit from the app's menu in the menu bar, or press Command (⌘)-Q.

Important: Chrome will be removing support for Chrome Apps on all platforms. Chrome browser and the Chrome Web Store will continue to support extensions. Read the announcement and learn more about migrating your app.

In this step, you will learn:

  • The basic building blocks of a Chrome App, including the manifest file and background scripts.
  • How to install, run, and debug a Chrome App.

Estimated time to complete this step: 10 minutes.
To preview what you will complete in this step, jump down to the bottom of this page ↓.

Get familiar with Chrome Apps

A Chrome App contains these components:

  • The manifest specifies the meta information of your app. The manifest tells Chrome about your app, how to launch it, and any extra permissions that it requires.
  • The event page, also called a background script, is responsible for managing the app life cycle. The background script is where you register listeners for specific app events such as the launching and closing of the app's window.
  • All code files must be packaged in the Chrome App. This includes HTML, CSS, JS, and Native Client modules.
  • Assets, including app icons, should be packaged in the Chrome App as well.

Create a manifest

Open your favorite code/text editor and create the following file named manifest.json:

Notice how this manifest describes a background script named background.js.You will create that file next.

We'll supply you with an app icon later in this step:

Create a background script

Create the following file and save it as background.js:

This background script simply waits for the chrome.app.runtime.onLaunched launch event for the application and executes the callback function:

When the Chrome App is launched, chrome.app.window.create()will create a new window using a basic HTML page (index.html) as the source.You will create the HTML view in the next step.

Background scripts may contain additional listeners, windows, post messages, and launch data — all of which are used by the event page to manage the app.

Create an HTML view

Create a simple web page to display a 'Hello World' message to the screen and save it as index.html:

Just like any other web page, within this HTML file you can include additional packaged JavaScript, CSS, or assets.

How

Add an app icon

Right-click and save this 128x128 image to your project folder as icon_128.png:

You will use this PNG as our application's icon that users will see in the launch menu.

Confirm that you have created all your files

You should have these 4 files in your project folder now:

Install a Chrome App in developer mode

Use developer mode to quickly load and launch your app without having to finalize your app as a distribution package.

  1. Access chrome://extensions from the Chrome omnibox.
  2. Check off the Developer mode check box.
  1. Click Load unpacked extension.
  2. Using the file picker dialog, navigate to your app's project folder and select it to load your app.

Launch your finished Hello World app

After loading your project as an unpacked extension, click Launch next to your installed app. A new standalone window should open up:

Congratulations, you've just created a new Chrome App!

Google Chrome On A Mac

Debug a Chrome App with Chrome DevTools

You can use the Chrome Developer Tools to inspect, debug, audit, and test your app just like you do on a regular web page.

After you make changes to your code and reload your app (right-click > Reload App), check the DevTools console for any errors (right-click > Inspect Element).

(We'll cover the Inspect Background Page option in Step 3 with alarms.)

The DevTools JavaScript console has access to the same APIs available to your app. You can easily test an API call before adding it to your code:

For more information

How To Run A Chrome App Mac Free

For more detailed information about some of the APIs introduced in this step, refer to:

How To Launch Chrome App

Ready to continue onto the next step? Go to Step 2 - Import an existing web app »

How To Run A Chrome App Mac Pro

댓글 영역