Is there a way to programmatically close Chrome that is running in Kiosk mode?

Currently, I am facing an issue with my Angular 9 app running in Chrome within a Kiosk mode environment. I urgently require a solution to close the Chrome browser as there is no keyboard attached to the PC handling the app.

Is there a way to achieve this programmatically without relying on extensions? Transitioning to another browser is also a viable option.

Prior attempts involved accessing the window object in Angular and utilizing window.close();, but it appeared that I was targeting the wrong instance, leading to only a component of the application shutting down instead of the entire Chrome window.

I understand that closing a window via JavaScript is restricted if it wasn't initially opened using JavaScript. However, based on a comment from this particular source, I speculated that Kiosk mode could potentially alter these rules.

Edit:

Investigation revealed that the component shutdown was due to a glitch within our software, explaining why window.close(); failed to function as anticipated.

Answer №1

To ensure the stability of your browser, consider implementing a watchdog process that performs the following tasks:

  • Starts up the browser
  • Monitors changes in the window title

If the window title transitions to 'TERMINATING - Chrome' or any specified keyword set by JavaScript, the watchdog process will terminate the browser.

In addition, the watchdog can automatically restart the browser if it crashes unexpectedly without any termination request.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Mastering the art of using wildcards in CSS can help you harness the power of recognizing attributes

I am facing a situation where I have an HTML table with numerous cells, some of which are assigned classes like hov1, hov2, ..., hov42, ..., all the way up to hov920. This is a compact table where the darker green cells (hov1) change when hovered over whi ...

Create a unique marker using the jsartoolkit5 library

I am working on a project involving Augmented Reality using jsartoolkit5 along with Three.js, and I am interested in incorporating a custom marker similar to the one demonstrated in this example. The markers are loaded into the project using the following ...

Utilize the controller data to display information on a day-by-day basis

In my attempt to design a weekly calendar using AngularJS, I am facing challenges when it comes to inserting events into the 7 boxes representing each day of the week on the calendar. The current HTML structure is as follows: <div class="week"> ...

Verify login availability using Javascript auto-check

For quite some time now, I've been grappling with a significant issue that has been consuming my attention. I am determined to implement an auto-check login availability feature in the registration form of my website. My goal is for it to verify the ...

Do you think there is a more optimal approach to writing if (argList[foo] === "bar" || argList === "bar")?

I have an if statement : if (argList["foo"] === "bar" || argList === "bar"){ // some code } I am curious if there is a concise or more elegant way to express this condition. The reason behind writing this statement is that I have two functions: st ...

Transform text hue using regular expressions in TypeScript/React

Why isn't my class being used in my regex function? I'm quite confused about what's going on. Regex let headingTitle: Element | null = document.querySelectorAll("h2") headingTitle.innerHTML = headingTitle.textContent?.repla ...

Bidirectional data binding with a nested object property. (Using VueJS and VueX)

I'm currently working on the following code snippet: <script> export default { computed: { editingItem: { get() { return this.$store.getters['editing/editingItem']; }, set(newValue) { this.$stor ...

Retrieve the value of a child component that has been dynamically generated

I decided to create a custom component that includes a MUI TextField nested inside a MUI card. import * as React from 'react'; import Box from '@mui/material/Box'; import Card from '@mui/material/Card'; import CardContent from ...

Organize your columns using the jQuery Flexigrid sorting feature

Is it possible to make JQuery Flexigrid columns sortable without defining them in-line? For example, instead of explicitly defining the columns like this: $("#flex1").flexigrid( { colModel: [ { display: 'Col1', name: ...

Using Angular Material to create a data table with a fixed footer and paginator feature

I am facing a challenge with displaying the sum of rows data in the footer section of an Angular Material Table that has fixed footer and header, as well as a paginator. How can I calculate the sum of rows data to show in the footer? https://i.sstatic.net/ ...

Troubleshooting problem with Webpack and TypeScript (ts-loader)

Seeking help to configure SolidJS with Webpack and ts-loader. Encountering an issue with return functions. What specific settings are needed in the loader to resolve this problem? import { render } from "solid-js/web"; const App = () => { ...

Toggle visibility of DIV based on Selection Drop Down

In an attempt to toggle a variable DIV using the code below: $('#'+content_id).toggle(option.hasClass(show_class)); I have encountered difficulty getting the variable ID. It seems that I am either naming the variable incorrectly or placing it i ...

Sass could not compile due to an i18n error - the resource file was not located

Within our Angular 4 application, we are encountering an issue while trying to implement i18n. The problem arises when running npm run i18n as it displays an error stating 'Resource file not found': Error: Compilation failed. Resource file not ...

Implementing asynchronous validation in Angular 2

Recently started working with Angular 2 and encountered an issue while trying to validate an email address from the server This is the form structure I have implemented: this.userform = this._formbuilder.group({ email: ['', [Validators.requir ...

Troubleshooting issues with the delete functionality in a NodeJS CRUD API

I've been struggling to implement the Delete functionality in my nodejs CRUD API for the past couple of days, but I just can't seem to get it right. As I'm still learning, there might be a small detail that I'm overlooking causing this ...

The Angular6 application is experiencing an issue where the JWT token is not being transmitted through

intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { let request = req.clone({ setHeaders: this.getRequestHeaders() }); return next.handle(request).map((event: HttpEvent< ...

Effective method of delegating a section of a reactive form to a child component in Angular 5

Here is a form declaration for reference: this.form = this.fb.group({ party: this.fb.group({ name: [null, Validators.required], givenName: [null, Validators.required], surname: [null, Validators.required], ...

combine blank cells in table generated with vuejs

I am attempting to display a table of students where each column represents a subject, and underneath each column are the names of the students who failed in that particular subject. The challenge I am facing is that my data is structured in rows instead o ...

What causes the choppy and inconsistent performance of requestAnimationFrame on Ubuntu's Chrome browser?

I'm at a loss here, unsure of what might be causing this issue. After developing a game engine with webgl, I conducted testing primarily on Firefox where everything ran smoothly without any lag or stuttering, even during more intensive tasks like ble ...

When clicked, display a text field input in the form

I have been working on a form that will allow users to search through a database with different criteria such as name, location, and time zone. Each criterion has a button that, when clicked, should display an input text field for the user to specify their ...