Im in the process of developing Browser for ARM Device. I've done rendering of pages and basic javascript executions using V8. Now am in the process of Integrating Javascript DOM.
Is any independent library version (.so) of DOM available?
...
In a web page,i want to get every visible text in a textnode.I don't want to put all the result into one array.I mean, when i meet a visible text, i will do something else.
How could i achieve it?
...
I am developing a small web-utility that displays some data from some database tables.
I have the utility running fine on FF, Safari, Chrome..., but the memory management on IE8 is horrendous. The largest JSON request will return information to create around 5,000 or so rows in a table within the browser (3 columns in the table).
I'...
What bad things happen at the moment document.write() is invoked?
I've heard bits and pieces about document.write having an adverse impact on the DOM or on the use of Javascript libraries. I have an issue in front of me that I suspect is related, but have not been able to find a concise summary of what damage the method does.
...
Now this may seem like a silly question, but I need to know how to remove a DOM element BEFORE it is displayed to the user. In short, I am using a div that has a background image alerting the user to enable javascript before proceeding. If the user has javascript enabled I am using jQuery to remove the DOM element, in this case $(".check...
Is this faster:
$(document.links).filter('a.someClass')
than just plain old this:
$('a.someClass')
?
I don't see anywhere in jQuery's code the utilization of document.links
which gives you the collection of links on the document right away,
than, it would seem, it would be faster to just filter in the collection
instead of all the...
I'd like to build a windows forms app to allow users to make selections within the Browser object. I'd like to capture their selection (by index or DOM element - no too picky at this point) and use this information to query content from the page.
How can I capture the DOM selection from my C# app code?
...
How would I go about creating a cross-browser script, that would intercept all events firing on
a page/browser window/DOM-tree (regardless of browser)?
What I'm hoping to accomplish is basically to get a better understanding of the different handling
of events in different browsers; I know the basic theory, but need to see to believe......
I want to postion a DIV inside a page such that it is visible to the user even if the user vertically scrolls the page.
The page has a heading at the top of the page which is 75 px tall. Now when the user is at the top of the page and has not scrolled vertically, the DIV must be postioned below the heading. However, once the user scrol...
I am developing a firefox extension and ideally would be able to get the whole darn DOM as a string.. forget any data structure. I just want what I see in "view source" in a buffer. I have been checking out javascript references and HTMLDocument etc. with no avail.
Ideally I would be able to write to this buffer as well (seems possible...
I mean, assume a web page is very long and contain lots of words, now i just want to get the value of a textnode which is being shown on the screen.How could i do it? Thanks! :)
what's more:
I mean, i know how to get the value of a textnode,but if a web page is very lage and contains thousands of words, what i want to do is that,only ge...
Hi, guys. Here's another sample script in VBScript. It opens internet explorer, navigates to google, sets up a search field and submits a query.
set ie = CreateObject("InternetExplorer.Application")
ie.navigate("www.google.com")
ie.visible = true
while ie.readystate <> 4
wscript.sleep 100
WEnd
set fields = ie.document.getelemen...
Hello.
I get a page using file_get_contents from a remote server, but I want to filter that page and get a DIV from it that has class "text" using PHP. I started with DOMDocument but I'm lost now.
Any help?
$file = file_get_contents("xx");
$elements = new DOMDocument();
$elements->loadHTML($file);
foreach ($elements as $element) {
...
I'm trying to extend the DOMDocument class so as to make XPath selections easier. I wrote this piece of code:
class myDOMDocument extends DOMDocument {
function selectNodes($xpath){
$oxpath = new DOMXPath($this);
return $oxpath->query($xpath);
}
function selectSingleNode($xpath){
return $this->selectNodes($xpath)->item(...
As noted by others, in Java, with the default W3C DOM libraries, one is required to use the Document object a factory to elements, i.e.:
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Document d;
Element e;
e = d.createElement("tag");
Why is that necessary? Why conceptually a method can't create an XML element without...
<div id="div">
<div> <!-- first level -->
<div> <!-- second level -->
<div>1.1</div> <!-- third level -->
<div>1.2</div>
</div>
<div>
<div></div>
<div>2.2</div>
</div>
</div>
</div>
What are the jQuery selector expressions for selecting the followin...
Hi!
I've developed a plug-in for Firefox, that can read and manipulate the content of the currently opened document. I would like to apply a XLST to the document in case it is XML. I have no problem to read the XML document and apply a XSLT to it in memory, however, I have no idea of how to replace the existing document with the newly c...
Is it possible to modify the DOM during or before the initial DOM parsing? Or do I have to wait until the DOM is parsed and built before interacting with it? More specifically, is it possible to hinder a script element in DOM from running using userscripts/content scripts or similar in chrome or firefox?
Tried using eventListeners on DO...
Hi, I have a <table> in a web page that I populate using JavaScript code like this:
var cellBarcode = row.insertCell(1);
var textNode = document.createTextNode(barcode);
cellBarcode.appendChild(textNode);
var cellItemName = row.insertCell(2);
var textNode = document.createTextNode(itemName);
cellItemName.appendChild(textNode);
I need ...
Is there any way to get the collection of all textNode objects within a document?
getElementsByTagName() works great for Elements, but textNodes are not Elements.
Update: I realize this can be accomplished by walking the DOM - as many below suggest. I know how to write a DOM-walker function that looks at every node in the document. I ...