Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Dojo & DOM

 
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter Svensson,

Dojo only provides portion of DOM manipulation. Where incompatibility in browsers exists or APIs are not defined.

Does "Learning Dojo" provide a reference to these standard DOM APIs? (perhaps in an appendix) If not, what would you suggest as a reference for those APIs?

Are there any extensions to Dojo that provide additional DOM manipulation, perhaps for specific formats of manipulating?
 
Author
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bill,

I don't cover a lotof that specifically, no. I can give some reference though. Just recently, it was decided to adopt a new functioncalled attr;

http://www.sitepen.com/blog/2008/10/23/dom-attributes-and-the-dojo-toolkit-12/

Almost all state changes in both Dojo widgets and DOM elements and styling can be done (or checked) with attr, which simplifies thing very much.

Examples from the article;

var node = dojo.byId("testDiv");
onOver = function(evt){console.warn('OVER');}

dojo.attr(node, "onmouseover", onOver);
dojo.attr(node, "tabindex", 1);
dojo.attr(node, "style", {"background": "#ff0000"});
dojo.attr(node, "name", "nameAtt");
dojo.attr(node, "innerHTML", "New Content");

Cheers,
PS
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic