General information
Category:
Internet applications
Given a specific location in an HTML document that you want to manipulate with DHTML, is there a way to determine the font attributes of what a newly inserted character will be? So far, the only way I have found to do this is to "walk the DOM" using the parentelement method and keeping track of the innermost elements that have to do with font attributes (such as SIZE=N FACE=x COLOR=c) and by looking tracking things like and . Lots of iteration scutwork. Seems that there should be a method or property in the DOM that lets you ask: What is the font face, font size, etc at this point in the document? Clearly the rendering engine has to know that because it renders text using exactly that information.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only