HTML 5
--------section 1 ----------------------
1. avoid switch
2. scope: block scope v function scope
3. for (var i…) {}, variable i is not scoped to the loop… it is scoped to the whole function.
4. if (a) b(); c();
always put curly bracelet in
5. ++: increment pointer x+=1…
-----section 2, ECMA script next -----------------
1. var Point2D = new StructType ({
x: uint32,
y: uint32})
{)
var Pixel = new SructType ({
point: point2D,
..
new Triangle ([….
2. Private names
function Container() {
var secret -3;
this service = function() {
if (scret--) {
}
}
can not put into prototype, so
introduce key
var key - Name.create("secret");
function Container () {this[key] = 3}
Container.protype
3. WeakMap(), already ship in firefox, key is identical to object
var title = new Title();
var result = [..]
titles.set(title, result)
association, as soon as the key disappear, the value disappear
4. lower level feature
Proxy.create( {
get:
set:
delete:
}, proto)
DOM to be implement as pure JS object
re implement DOM
5. Callback: the new goto? well, no..but…still……
function* g() {
yield 1:
yield 2;
}
var obj = g();
obj.next(); //1
obj.next(); //2
6. Task.js ----> check it out
7. Modules pattern
8. … remaining param
…: extra argument
array.push(thing1, thing2, … more args)
9. default value for arguments
10. let : new var
let is same as var and is better
11. var {r, g, b} = thing.color;
var [x,y] = circle.center;
[a,b] = [b,a]
easy to unwrap
12. var obj = {
foo: "foo",
bar () {return this.foo},
[getName()':17
};
13: for …in
for (x in [3,4,5]) // 0, 1, 2
for (x of [3.4.5]) // 3, 4, 5
14. interate object
15. [x*y for (x of obj1) for (y of obj2)]
16. '
ohai, ${firstName} ${lastName}
'
----------HTML5------------------
1. SF HTML5 User Group
www.sfhtml5.org
2. What is HTML 5
- The new jamjor milestone for HTML
- Focused on Web Applications
- Web aps are rapidly becoming first class apps, on par with desktop
- Different definitions
3. NEWT:
4. http://html5test.com
5. WHY HTML5
- email type
- simpler
- Simplified DocType
- Simplified Character Type
- Simplified Markup
- Less Plugins
- Secure by Defult
. HTML5 users orgin-based secuity
. DEfines secure cross-origin sharing
. HTML5 is not with flaows, but issues will be fixed
6. HTML Feature Areas
Semantics
CSS3
Device Access
Performance
Offline/Storage: Use web apps on/off line
Connectivity:
7. Valid HTML vs Valid XHTML
- If you are so proud of your XHTML
- Why do not you serve it with the right mime type?
- Use HTML5 and create valid html
8. New HTML 5 Elements
9. Removed Elements
.......
10. Semantic Markup Benefits
- Based on research
- Cleaner, less verbose markup
- Machine readable, search engine, Syndication
- Linking and sharing
11. Anatomy of an HTML5 Page
12. HTML5 page in IE<9, not so great
13. HTML5 Microdata
<...
14. HTML5 Forms
-No JS required
-Native date and color pickers
-Search, email, webaddress
-Client side validation
15. CSSS Level 3
. Modularized for easier browser uptake
. Almost 50 modules
. Use browser-specific prefixes until finalized
. Dramatically improves performance
. Examples;
- Border raduis
- Gradients
- Multi-cloumn layout
- reflection
- Etc
16. Multimedia
New HTML5 media elements,
0 Comments:
Post a Comment
<< Home