The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
0answers
39 views

How to avoid global state via the DOM in JavaScript? [closed]

Much has been said about the practice of using global variables. After spending some time creating a JavaScript web application, it occurs to me that many of the issues I have encountered have come ...
-1
votes
4answers
81 views

What exactly is the meaning of “node” in Document Object Model (DOM)?

I've searched for the definition of a "node" in a programming language and I am still finding it hard to understand. Could anyone advice me in simple, layman's terms: What is a node?
16
votes
1answer
5k views

Is vanilla JS still considered a library?

I very recently found out that VanillaJS (document?) is a library that's just bundled with 99% browsers and isn't exactly native JavaScript (shock of my life). While writing a lib of my own I normally ...
2
votes
3answers
472 views

Reasons for moving from pure JavaScript to a JavaScript library

Being aware of the direct benefits of libraries having things wrapped in a package, making daily work easier, my question is leaning more towards the fact that many features not implemented in ...
4
votes
3answers
225 views

Javascript Use of Window Object through alternate means

Disregard your usual paradigms for a mere moment here.... I've seen a few sites who have used the following logic: a=[]; b=a["sort"]; c=(b)(); c["alert"](1); // intended output: Alert displaying ...
0
votes
0answers
42 views

DOMDocument programming: a lot of little dilemmas, how to solve them?

I need elegance and performance: how to decide by the "best implementation" for each DOM algorithm that I face. This simple "DOMNodeList grouper" illustrate many little dilemmas: use ...
0
votes
5answers
245 views

Why do we write the action to be performed by a function in jQuery inside the parentheses?

Generally whenever we're programming in any Programming language, say C, we would pass the parameters we need to pass to a function using the parentheses next to the name of the function. Whereas in ...
7
votes
3answers
197 views

In DOM, why is childNodes defined in the Node interface if only some node types can have childNodes?

In DOM, why is childNodes defined in the Node interface if only some node types such as Element, Document and DocumentFragement, can have childNodes? Is this considered a good design? In what cases ...
23
votes
1answer
3k views

A few clarifications about the DOM

I have been trying to understand the DOM, and although I have a fair idea of what it is, there are certain ideas I just cannot pin down. I will list down what I think the DOM is and my questions will ...
12
votes
1answer
622 views

Google Blink (new WebKit fork): Meaning of “Moving DOM into Javascript”?

From the Blink Blog: Finally we’d like to explore even larger ideas like moving the entire Document Object Model (DOM) into JavaScript. What does this mean? Does it mean WebKit's DOM is ...
0
votes
1answer
340 views

Why does flask use Jinja2 and not xpath?

I'm just starting out with python and since I'm coming from a PHP background (thus have to adjust my mind to wrap around new concepts) one major question still stands without answer - why does Flask ...
3
votes
1answer
250 views

How is the DOM language independent?

Quoting from Wikipedia The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. and ...
0
votes
2answers
213 views

Can anyone point me to some examples / reading material that outline updating the dom automatically? [closed]

Basically I would like to know how apps such as hotmail receive emails in realtime, without making periodic checks on the server - I've sent an email to myself from outlook with hotmail open and saw ...
33
votes
3answers
6k views

What's so bad about the DOM?

I keep hearing people (Crockford in particular) saying the DOM is a terrible API, but not really justifying this statement. Apart from cross-browser inconsistencies, what are some reasons why the DOM ...
2
votes
1answer
184 views

Can we create a reference to DOM objects like document.location

As we have a wonderful concept called hooking where we can create a reference to a function and connect another function In the same way can we create a reference to DOM objects. For example can we ...
2
votes
2answers
99 views

How should XML subtree manipulation be handled in a public API?

I'm working on an API whereby a specific call would replace a subtree of an XML document—rooted at some element—with another subtree. The two options I'm considering for a response to this call are: ...
3
votes
1answer
672 views

xpath vs DOM API

I just came up on xpath recently while writing a greasemonkey script and immediately fell in love. I haven't done any benchmarking yet (coming soon), but according to a couple sources that I read, ...
6
votes
3answers
1k views

Should jQuery DOM manipulation be avoided in favor of JavaScript template engines?

From what I can tell, most developers will use heavy jQuery DOM manipulation tactics to deliver their updated AJAX views. Once things get out of hand, they may consider refactoring using template ...
5
votes
4answers
974 views

Is there a book for learning Javascript -> DOM -> jQuery? [duplicate]

Possible Duplicate: The importance of javascript and the best way to learn it? I would like to learn Javascript, the DOM model and jQuery. I've found many recommendations for books for ...
2
votes
2answers
167 views

What tools can be used to get a reference like document.frames.item(0).document.innerhtml?

I want to scrape things from a web page. The way I want to do this is to extract the text of a DOM element (I believe this is the correct description). This means that I will to retrieve the text of ...
6
votes
4answers
1k views

HTML text editor with DOM manipulation?

While editing a static HTML file today, I realized, that many things I did using search and replace with regular expressions, would be much easier using JavaScript (and possibly a DOM library like ...