DOM event The DOMContentLoaded event is fired when the document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading (the load event can be used to detect a fully-loaded page).
Questions tagged [domcontentloaded]
124 questions
0
votes
1 answer
ReadyState interactive vs DOMContentLoaded
I was setting up a very simple page to populate a dropdown list from an array on DOMContentLoaded Event, however in my environment (VS code + live Server extension), I was getting an error because the entire body object didn't exist at the moment…

EstebanSmits
- 91
- 2
- 8
0
votes
0 answers
Using DOMContentLoaded and window.onload in selenium java
Is there a way I could use javascript's document.addEventListener("DOMContentLoaded", ready)
and window.onload() in selenium script in java ?
Something like :
JavascriptExecutor js = (JavascriptExecutor)Driver;
js.executeScript("return…

Ajeeth
- 19
- 4
0
votes
1 answer
0
votes
1 answer
How to reduce the DOMContentLoaded Time using Angular2
I am converting a template (Dashboard like) from JQuery to Angular 2. The website have lot of popups and these popups have many tabs so I put each popup in different component to maintain its code and logic separately. Now if I observe the Network…

Mehmood Ahmad
- 627
- 2
- 5
- 22
0
votes
1 answer
Real Time Editor
I am trying to get it where when the Page loads, it will automatically load the Code that I have in the Text Box, I was thinking maybe using a Dom Content Loaded? Any Suggestions?
…

BigFella
- 45
- 8
0
votes
2 answers
Load function from within DOMcontentLoaded scope
jsfiddle
https://jsfiddle.net/ee7oe5pb/2/
Javascript
var events = (function () {
var fn = {};
fn.refresh = function(message) {
alert(message);
}
return fn;
})();
var menu = (function () {
var fn = {};
fn.init =…

Jens Törnell
- 23,180
- 45
- 124
- 206
0
votes
2 answers
Plain JavaScript on-page-load event not working
The question is pretty simple: why is nither of those are working when they should? Tried in latest chrome and FF
document.addEventListener("DOMContentLoaded", function() {
alert("window on domcontentready");
}, false);
window.onload = function()…

ilyo
- 35,851
- 46
- 106
- 159
0
votes
1 answer
Load multiple pages in a hidden iframe from a xul-based firefox extension
From a xul-based firefox addon, I need to:
programmatically create an invisible iframe (once)
reuse it to load multiple URLs as the addon runs
access the returned HTML after each URL loads
Problem: I can only get the first page-load for any…

rednoyz
- 1,318
- 10
- 24
0
votes
2 answers
javascript event: get when document is textually fully loaded but scripts haven't ran yet
DOMContentLoaded fires after document is loaded and its scripts ran, and I'd like to run my code before scripts were executed but after document.body.outerHTML ( document.childNodes[document.childNodes.length-1].outerHTML ) is full
I try this, but…

Owyn
- 663
- 2
- 8
- 17
0
votes
1 answer
very slow wordpress theme DOMcontentLoaded takes 6sec
i have a wordpress site Migau and it loads very slowly.
I did a speed test and this the result came back with a 6 sec load of my DOMcontentloaded.
Can anyone help with this matter
Thanks
0
votes
1 answer
Generate more content as user scrolls without sql
My goal is go generate the following code when the user scrolls down:

Justin Miller
- 54
- 1
- 9
0
votes
3 answers
$ is not defined before DOMContentLoaded - JQuery
the first statement in a js file I have is
$(document).on("DOMContentLoaded", function (event) {
$(document.body).on('beforeinsert', onBeforeInsert);
$(document.body).on('afterinsert', onAfterInsert);
$(document.body).on('wait', onWait);
…

TruthOf42
- 2,017
- 4
- 23
- 38
0
votes
1 answer
Unobtrusive plain Javascript with several DOMContentLoaded events organization
Maybe it is a silly question but I am a very confused with JavaScript. I follow this code organisation with as much as possible unobtrusive JavaScript. I build a website in Ruby on Rails that uses Google Maps.
My scenario: Suppose I have a REALLY…

vasilakisfil
- 2,279
- 4
- 24
- 31
0
votes
1 answer
Access dom after "chrome-document-global-created"
I need to get the DOM when the Mozilla observer event "chrome-document-global-created" is fired. Therefore, I have the following code. But how can I get the DOM from there? Data is null (according to documentation), can someone please tell me which…

Fabian Frank
- 49
- 7
-1
votes
1 answer
Does Javascript load event listener takes images into account?
Does this
window.addEventListener("load", function(event) {
console.log("DOM including images loaded?")
});
fire after only the DOM has been loaded or when everything, including images have been loaded?
Is this what I'm looking for:…
user1431398