author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Tue, 27 Nov 2012 16:03:34 +0200 | |
changeset 1441 | 67d287d2e77e |
parent 1430 | 8d066d8806b3 |
child 1533 | 38f62ec2f1ed |
permissions | -rw-r--r-- |
1419 | 1 |
.. -*- coding: utf-8; -*- |
2 |
.. include:: HEADER.rst |
|
3 |
||
4 |
============= |
|
5 |
JavaScript. |
|
6 |
============= |
|
7 |
.. contents :: |
|
8 |
||
9 |
HTML. |
|
10 |
===== |
|
11 |
||
12 |
<noscript> tag used to render HTML if JavaScript disabled in browser. |
|
13 |
||
14 |
Including JavaScript in HTML page. |
|
15 |
================================== |
|
16 |
:: |
|
17 |
||
18 |
<html> |
|
19 |
<head> |
|
20 |
<script type="text/javascript" src="abc.js"></script> |
|
21 |
</head> |
|
22 |
... |
|
23 |
<html> |
|
24 |
||
25 |
Inlining JavaScript in HTML code. |
|
26 |
================================= |
|
27 |
:: |
|
28 |
||
29 |
<html> |
|
30 |
<h1>Hello!<h1/> |
|
31 |
<script language="javascript"> |
|
32 |
<!-- |
|
33 |
alert("Hello!") |
|
34 |
document.write("sin(10) = " + Math.sin(10)) |
|
35 |
//--> |
|
36 |
</script> |
|
37 |
</html> |
|
38 |
||
39 |
Reduce js code size. |
|
40 |
==================== |
|
41 |
||
42 |
http://crockford.com/javascript/jsmin |
|
43 |
The JavaScript Minifier |
|
44 |
http://developer.yahoo.com/yui/compressor/ |
|
45 |
YUI Compressor |
|
46 |
||
1429
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
47 |
JavaScript standards. |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
48 |
===================== |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
49 |
|
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
50 |
http://www.ecma-international.org/publications/standards/Ecma-262.htm |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
51 |
ECMAScript Language Specification. |
1430
8d066d8806b3
Archive of JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1429
diff
changeset
|
52 |
http://www.ecma-international.org/publications/standards/Ecma-262-arch.htm |
8d066d8806b3
Archive of JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1429
diff
changeset
|
53 |
ECMAScript Language Specification. |
1429
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
54 |
http://www.ecma-international.org/publications/standards/Ecma-327.htm |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
55 |
ECMAScript 3rd Edition Compact Profile |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
56 |
http://www.ecma-international.org/publications/standards/Ecma-357.htm |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
57 |
ECMAScript for XML (E4X) Specification. |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
58 |
http://www.ecma-international.org/publications/standards/Ecma-290.htm |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
59 |
ECMAScript Components Specification. |
20c7582806da
JavaScript standards.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1427
diff
changeset
|
60 |
|
1419 | 61 |
JavaScript versions. |
62 |
==================== |
|
63 |
||
64 |
JavaScript 1.5 was introduced back in 1999. |
|
65 |
||
66 |
https://developer.mozilla.org/en-US/docs/JavaScript/Reference#JavaScript.2FBrowser_support_history |
|
67 |
List of versions with CHANGES. |
|
68 |
http://en.wikipedia.org/wiki/Javascript#Versions |
|
69 |
List of versions per browser. |
|
70 |
http://en.wikipedia.org/wiki/ECMAScript#Version_correspondence |
|
71 |
List of versions. |
|
1426
fc39c0ba45d7
ECMAScript 5 compatibility table.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1419
diff
changeset
|
72 |
http://kangax.github.com/es5-compat-table/ |
fc39c0ba45d7
ECMAScript 5 compatibility table.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1419
diff
changeset
|
73 |
ECMAScript 5 compatibility table. |
1427
4c3456855f5f
Can I use ECMAScript 5 Strict Mode?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1426
diff
changeset
|
74 |
http://caniuse.com/use-strict |
4c3456855f5f
Can I use ECMAScript 5 Strict Mode?
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1426
diff
changeset
|
75 |
Can I use ECMAScript 5 Strict Mode? |
1419 | 76 |
|
1441
67d287d2e77e
Pretty print from JavaScript.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1430
diff
changeset
|
77 |
Pretty print from JavaScript. |
67d287d2e77e
Pretty print from JavaScript.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1430
diff
changeset
|
78 |
============================= |
67d287d2e77e
Pretty print from JavaScript.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1430
diff
changeset
|
79 |
|
67d287d2e77e
Pretty print from JavaScript.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1430
diff
changeset
|
80 |
To Web Developer console (Firefox/Chrome):: |
67d287d2e77e
Pretty print from JavaScript.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1430
diff
changeset
|
81 |
|
67d287d2e77e
Pretty print from JavaScript.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1430
diff
changeset
|
82 |
console.debug ("%o", obj); |
67d287d2e77e
Pretty print from JavaScript.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1430
diff
changeset
|
83 |
|
1419 | 84 |
XML from JavaScript. |
85 |
==================== |
|
86 |
||
87 |
Powerful, standards-compliant JavaScript XML parser that is designed to help web application |
|
88 |
designers implement cross platform applications that take advantage of client-side manipulation of |
|
89 |
XML data. XML for <SCRIPT> provides a full suite of tools, including: |
|
90 |
||
91 |
* A standards-compliant W3C DOM Level 2 processor |
|
92 |
* An XPath processor |
|
93 |
* A standards-compliant SAX processor |
|
94 |
* A simple (classic) DOM processor |
|
95 |
* Proxies for XML retrieval from any domain |
|
96 |
* Utilities for XML and application development |
|
97 |
||
98 |
http://xmljs.sourceforge.net/ |
|
99 |
home page |
|
100 |