window-object

What is wrong with this JavaScript Code?

This code is giving me error on line 10 in IE6. That is, var ref = ...; What is the error here? <html> <head> <title>JavaScript Popup Example 3</title> </head> <SCRIPT language="JavaScript1.2"> function MyClass() { this.OpenWindow = function() { var ref = window.open ("http://www.google.com", "mywindow", "location=1,statu...

Qt 4.6 Adding objects and sub-objects to QWebView window object (C++ & Javascript)

I am working with Qt's QWebView, and have been finding lots of great uses for adding to the webkit window object. One thing I would like to do is nested objects... for instance: in Javascript I can... var api = new Object; api.os = new Object; api.os.foo = function(){} api.window = new Object(); api.window.bar = function(){} obvious...

This works in Chrome but not IE, why?

var shell = function (method) { window[method].apply(null, Array.prototype.slice.call(arguments, 1)); }; shell('alert', 'monkey!'); ...