It is from an external js file and it is the only file linked to the page.
OK.
When I double click this file I get the following error
Sounds like you’re double-clicking/running a .js file, which will attempt to run the script outside the browser, like a command line script. And that would explain this error:
Windows Script Host Error: 'window' is not defined Code: 800A1391
… not an error you’ll see in a browser. And of course, the browser is what supplies the window
object.
ADDENDUM: As a course of action, I’d suggest opening the relevant HTML file and taking a peek at the console. If you don’t see anything there, it’s likely your window.onload
definition is simply being hit after the browser fires the window.onload
event.
Related Posts:
- jQuery document.createElement equivalent?
- How can I scroll to an element using jQuery?
- Include another HTML file in a HTML file
- Remove element by id
- How to resolve the C:\fakepath?
- Remove all child elements of a DOM node in JavaScript
- querySelector vs. getElementById
- JavaScript get element by name
- Find an element in DOM based on an attribute value
- React Error: Target Container is not a DOM Element
- scrollIntoView Scrolls just too far
- Difference between innerText, innerHTML and value?
- How do I set/unset a cookie with jQuery?
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- How can I check if an element exists in the visible DOM?
- How can I select an element by name with jQuery?
- How can I add a class to a DOM element in JavaScript?
- Parse an HTML string with JS
- For loop for HTMLCollection elements
- jQuery count child elements
- How do I check if an element is hidden in jQuery?
- document.getElementbyId() returning null
- Retrieve the position (X,Y) of an HTML element
- Invariant Violation: _registerComponent(…): Target container is not a DOM element
- Getting or changing CSS class property with Javascript using DOM style
- Cannot read property ‘style’ of undefined — Uncaught Type Error
- Getting a UnhandledPromiseRejectionWarning when testing using mocha/chai
- Creating multiline strings in JavaScript
- How to make a word underline in Markdown
- JQuery – $ is not defined
- Is it possible to sandbox JavaScript running in the browser?
- RegEx Ignore Case
- What is the convention in JSON for empty vs. null?
- Generating random whole numbers in JavaScript in a specific range?
- jQuery AJAX cross domain
- How to extract extension from filename string in Javascript?
- keep getting “? Something is already running on port 3000” when I do npm start on react app
- React Context vs React Redux, when should I use each one?
- Convert character to ASCII code in JavaScript
- Disable same origin policy in Chrome
- How do I remove a key from a JavaScript object?
- What is causing the error `string.split is not a function`?
- Uncaught TypeError: data.push is not a function
- Length of a JavaScript object
- Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode
- Module not found: Error: Can’t resolve ‘fs’ in
- TypeError: $(…).modal is not a function with bootstrap Modal
- How to do fade-in and fade-out with JavaScript and CSS
- I want to remove double quotes from a String
- Calculating median – javascript
- Vue is not defined
- How to remove all listeners in an element?
- npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\Nuwanst\package.json’
- How to change value of object which is inside an array using JavaScript or jQuery?
- How to detect pressing Enter on keyboard using jQuery?
- How to make your Discord Bot always active
- How to write inside a DIV box with javascript
- use Lodash to sort array of object by value
- How to make an HTML back link?
- How to fix getImageData() error The canvas has been tainted by cross-origin data?
- How to make fadeOut effect with pure JavaScript
- Strip all non-numeric characters from string in JavaScript
- Javascript – Track mouse position
- Finding the max value of an attribute in an array of objects
- How to initialize an array’s length in JavaScript?
- How to set text color for my d3 chart title?
- Defining a HTML template to append using JQuery
- Adding javascript to child theme
- What does l10n.js do in WordPress 3.1? And how do I remove it?
- How to add javascript just before the closing body tag in the footer of WordPress
- Open media frame and select an attachment
- Loading Javascript Only When Specific Content Existing in a Post?
- How to pre-fill Google Forms URLs with logged-in WordPress user’s data
- Use of Javascript with Dojo/Dijit on a WordPress page
- WordPress loads whole jQuery UI library
- Javascript that will execute on only child pages of a specific parent
- What is the Javascript event for an item being added to the cart in Woocommerce?
- Can the index.asset.php file be used with the enqueue_block_editor_assets action?
- Using wp.data.select get actual tags (not id’s) used in post
- JavaScript && operator in visual editor
- How to deal with the confliction between PHP-Markdown and MathJax?
- Programatically update posts in database from one block to another using transform
- Mouse wheel Auto scroll to anchor [closed]
- Adding inline JavaScript encoding issue
- a child theme not de-registering a patent javascript file
- Custom Gutenberg-Block esnext pass variables
- javascript not loading
- Using javascript on my site to create nested tabs
- Newest version of javascript
- wp_enqueue_script does not recognize my js file?
- create timestamp links to jump to specific times on rumble videos
- Loading two versions of same JS libary
- Error handling for wpdb error – displaying an error message to the user
- load-scripts.php loads incorrect file names
- JS enqueue path (localhost)
- Don’t understand how to link Javascript files in WordPress
- WP REST API – “rest_user_cannot_view” ONLY on specific users
- Uncaught ReferenceError: tippy is not defined
- How to add a new attribute to core wp block editor without npm?