Skip to content

Instantly share code, notes, and snippets.

@conradwt
Created December 24, 2009 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conradwt/29774f07f9a1468140f9 to your computer and use it in GitHub Desktop.
Save conradwt/29774f07f9a1468140f9 to your computer and use it in GitHub Desktop.
ComponentAlphaRoot >> updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
anHtmlRoot docType: 'html5'.
anHtmlRoot headElements title: 'This is a test'.
anHtmlRoot headElements meta name: 'description' content: 'Free Web tutorials';
name: 'keywords' content: 'HTML,CSS,XML,JavaScript';
name: 'author' content: 'CC';
charset: 'utf-8'.
anHtmlRoot stylesheet
url: 'http://www.example.com/stylesheets/main.css';
url: "/stylesheets/one.css";
url: "/stylesheets/two.css";
url: "/stylesheets/three.css".
WebCounter >> renderContentOn: html
html image url: '/images/main.png'.
html heading: count.
html anchor
callback: [ self increase ];
with: '++'.
html space.
html anchor
callback: [ self decrease ];
with: '--'
'load the relevant javascript files after the DOM has completely loaded'
'Note: this is what I would like to do'
html script type: 'text/javascript' charset: 'utf-8' source: 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'.
html script type: 'text/javascript' charset: 'utf-8' source: '/javascripts/one.js'.
html script type: 'text/javascript' charset: 'utf-8' source: '/javascripts/two.js'.
html script type: 'text/javascript' charset: 'utf-8' source: '/javascripts/three.js'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment