Questions tagged as 'dom'

1
answer

What is parse, and how DOM parse works in HTML5

I started to study CSS3 in depth, and I ended up wanting to better understand how HTML rendering works in the Document Object Model (DOM), and how to do this joining of HTML and CSS (and JS) style tags in the browser . I've read a lot, but he...
asked by 21.11.2015 / 19:14
3
answers

Is referring to an element via its id considered bad?

In Javascript, you can reference any element that has a id (and in some cases a name ) by simply using an identifier with the same name - without having to declare it: / p> <div id="teste">Teste</div> console.log(test...
asked by 26.06.2014 / 20:41
1
answer

$ e $$ are now browsers' native functions?

When using the console on a page without JavaScript, I noticed that typing $ had the same effect as document.querySelector and typing $$ had the same effect as document.querySelectorAll . Would two functions shortcu...
asked by 24.04.2017 / 23:07
4
answers

How to check if the properties of the window object are native?

I'm using shim that modifies several of the properties in the browsers window object. At this point I need to validate if one of the specific properties is native or a shim. Because shim can modify the native property. For example: (fu...
asked by 06.03.2014 / 15:50
3
answers

How do I add jquery library with javascript?

I would like to know how to load the jQuery library with pure Javascript and run something simple with jQuery after its loading? My code looks like this: function colocaScript(){ var scriptJquery = document.createElement('script')...
asked by 19.02.2014 / 14:44
2
answers

Clustered id rendering speed vs class

Some time ago I saw some tests to render CSS rendering using id to be faster than rendering using class , due to the amount of id is often lower in the document in relation to the number of classes (one of the tests you can check in this ta...
asked by 17.11.2015 / 18:59
5
answers

Is it possible to include elements in the DOM after it is loaded and ready?

I have a table that, depending on the amount of an X value, it inserts a set of attributes at the end of the page (fields). These elements have events assigned to them. But that's not the point. Problem is that: since I add the elements after...
asked by 06.02.2014 / 17:08
2
answers

Conflict between Simple_HTML_Dom and non-object-oriented functions

I'm developing an app that has to access a list of sites saved in a database, loading all its links. It is a test application but I have encountered a difficulty. The routine is this one: function crawler() { include_once './simple_htm...
asked by 08.05.2014 / 11:38
1
answer

How to use MutationObserver () correctly?

I know that MutationObserver() is designed to detect changes in the HTML DOM. But I wonder how this works in practice. We created a hypothetical situation, what's up? There is a <div> with id='hipotese' (I be...
asked by 02.08.2017 / 18:39
1
answer

Capture an element id with javascript click

In document there are three <div> , all with the onclick event that calls a function. By clicking on any of the three, I would like to capture the id of <div> clicked. How can I capture the id of this element...
asked by 15.06.2014 / 04:58