Questions tagged [window-object]

The Window object is a DOM interface that represents a browser window/tab that contains a DOM document. The Window object is defined in the HTML specification.

See also:

94 questions
1
vote
1 answer

Exposing a window object's document

I have a iframe whose content will be exposed by iframeObject.contentWindow. This returns a window object, according to mozilla developer network this window object to access the iframe's document and it's internal dom. However, I cannot figure…
Kevlwig
  • 133
  • 2
  • 11
1
vote
1 answer

How does XMLHttpRequest relate to the JS Window object

While reading up on XMLHttpRequest found out that it is a member of the high level JS global window object. For instance: if (window.XMLHttpRequest) { // Mozilla, Safari, IE7+ ... httpRequest = new XMLHttpRequest(); } else if…
Asim Mahar
  • 1,320
  • 1
  • 10
  • 13
1
vote
0 answers

nw.gui - TypeError: Cannot read property 'on' of undefined in gui.Window.open

Using node webkit, I'm trying to open a new window from the click of a button in the initial window, and at various points write to a textarea in the new window when running node.js code in the initial window context. The initial window (index.html)…
nick_j_white
  • 534
  • 6
  • 27
1
vote
1 answer

javascript: how to communicate between 2 windows?

I understand how to open windows and communicate between the original window that opened the 2nd window and the 2nd window to communicate back to the original window. However, I have a situation where I have original page and page 1. These pages are…
1
vote
1 answer

Function containing invalid characters in its name

I was trying to abuse function names in Chrome dev tools: window["hello world"] = function () { console.log("Hello World!"); } The line above will create hello world global function. It appears in autocomplete suggestions also: If we call it…
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
1
vote
1 answer

WindowObject.print() freeze in Chrome

I´m trying to print some content from a page. The page grabs some values from itself and builds a string that eventualy goes into an windowObject. Problem happens when the user close the print dialog by hitting X in the corner of the print dialog.…
1
vote
3 answers

Global variable can't be accessed through window object - intermittently(?!)

I have two pages, both with similar structures - tables with id tags like the following ... and
... Both pages are…
Todd Howe
  • 77
  • 1
  • 7
1
vote
0 answers

Attaching a function to the window object not working in IE8

I have a function defined on the window object somewhat like this window["functionName"] = function(){ // code here }; Now whenever I need that function I just call window["functionName"](); This works well in all browsers except IE8. IE8…
Mandeep Jain
  • 2,304
  • 4
  • 22
  • 38
1
vote
2 answers

Why undefined var is not added to window object JavaScript?

As far as I know the following declaration will not add any value to the variable aa: var aa = undefined; function a () { var aa; console.log(aa); // here aa is still undefined if(!aa) { aa = 11; // should add to the globle…
me_digvijay
  • 5,374
  • 9
  • 46
  • 83
0
votes
0 answers

window Object getting overwritten using React in Electron

I'm using react in electron trying to receive data from the main process to my renderer using the steps outlined here. https://www.electronjs.org/docs/latest/api/context-bridge import React, { useState, useEffect } from "react"; import { channels }…
0
votes
0 answers

Window reference got from window.open() gets closed automatically in Browsers

Steps to reproduce: Open wikipidia.org in a chrome tab and open the devtools. Enter the following command p = window.open('https://www.google.com') Once the window opens, entering p.closed returns true. But, If we replace the url of target window…
Faihan
  • 113
  • 1
  • 9
0
votes
2 answers

what is defference between console.log(this) in nodejs and console.log(this) in browser?

When I log (this) in the browser I get window Object, But when I log (this) in node.js I got {}. I road global object in node js is same window object in browser, What is precisely the deference between this and global Object in Node.js? Thanks for…
0
votes
0 answers

Why windows.open() is not working as expected?

I have created url object with Blob and it's type is 'application/pdf' const [url, setUrl] = useState(''); setUrl(URL.createObjectURL(mediaSource)); // mediaSource is a Blob useEffect(() => { if (url) window.open(url, '_blank') [url]); By this…
0
votes
1 answer

Next.js with Firebase Remote Config

I was trying to integrate Google's Firebase Remote config into my Next.js app. When following Firebase's docs, and just inserted the functions directly into my component's code block, like so: const remoteConfig = getRemoteConfig(app); I keep…
0
votes
0 answers

I’m having trouble creating dynamic variables with Window in JavaScript

I am trying to create dynamic variables using Window. The exact thing I want to do is working fine with eval. But as you may know, that’s not advised. Some examples. I may define some variables like this. var word1 = The; var word2 = Number; var…