13_DOM_Partie_2 - CSI 3540 Structures techniques et normes...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSI 3540 Structures, techniques et normes du Web Saturday, March 6, 2010 Objectif: • Bien comprendre le modèle objet de document (DOM HTML) ; l’API permettant à JavaScript (et aux autres langages) de manipuler la page courante de l’agent utilisateur Lectures: • Web Technologies (2007) § 5 pages 268-306 JavaScript, documents XHTML, CSS 2 et DOM Saturday, March 6, 2010 DOM - Qu’est-ce que c’est? • Laissons parler les auteurs de la spécifcation : • “(...) une interface indépendante de la plateforme et du langage qui permet aux programmes et aux scripts l' accès et la mise à jour dynamique du contenu et de la structure des documents .” Saturday, March 6, 2010 hasAttributes() hasChild( Node n ) insertBefore( Node newNode, Node aNode ) removeChild( Node aNode ) replaceChild( Node newNode, Node aNode ) #ELEMENT_NODE #ATTRIBUTE_NODE #TEXT_NODE #COMMENT_NODE #DOCUMENT_NODE #DOCUMENT_TYPE_NODE nodeType nodeName parentNode childNodes previousSibling nextSibling attributes Node < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd " > < title > Mon premier document </ title > < p > Hello world! </ p > < head > </ head > < body > </ body > < html xmlns = "http://www.w3.org/1999/xhtml " lang = “fr-CA” > </ html > html body head title p Saturday, March 6, 2010 Principaux objets hasAttributes() hasChild( Node n ) insertBefore( Node, Node ) removeChild( Node ) replaceChild( Node, Node ) #ELEMENT_NODE #ATTRIBUTE_NODE #TEXT_NODE #COMMENT_NODE #DOCUMENT_NODE #DOCUMENT_TYPE_NODE nodeType nodeName parentNode childNodes previousSibling nextSibling attributes Node createElement( String ) createTextNode( String ) getElementById( String ) getElementsByTagName( String ) doctype documentElement title body URL referrer ... document getAttribute( String ) setAttribute( String, String ) removeAttribute( String ) hasAttribute( String ) getElementsByTagName( String ) tagName Element data Text Principaux objets hasAttributes() hasChild( Node n ) insertBefore( Node, Node ) removeChild( Node ) replaceChild( Node, Node ) #ELEMENT_NODE #ATTRIBUTE_NODE #TEXT_NODE #COMMENT_NODE #DOCUMENT_NODE #DOCUMENT_TYPE_NODE nodeType nodeName parentNode childNodes previousSibling nextSibling attributes Node createElement( String ) createTextNode( String ) getElementById( String ) getElementsByTagName( String ) doctype documentElement title body URL referrer ... document getAttribute( String ) setAttribute( String, String ) removeAttribute( String ) hasAttribute( String ) getElementsByTagName( String ) tagName Element data Text Saturday, March 6, 2010 Saturday, March 6, 2010 Webkit • Engin pour XML , XHTML , CSS , XSLT , JavaScript et DOM • Code source libre • Semble suivre les standards W3C Saturday, March 6, 2010 Webkit • Rejeton des bibliothèques de programmes de KDE (Système de fenêtrage pour Linux) • Apple l’utilise pour Safari , Dashboard , Mail , mais aussi l’ iPhone et l’ iPod Touch • Navigateur...
View Full Document

{[ snackBarMessage ]}

Page1 / 84

13_DOM_Partie_2 - CSI 3540 Structures techniques et normes...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online