- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 22 Aug 2008 19:57:39 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv8107 Modified Files: Overview.html Log Message: Reword the <script> section to allow the element to be used for data blocks that aren't actually used by any scripts. Also include an example. (whatwg r2105) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1277 retrieving revision 1.1278 diff -u -d -r1.1277 -r1.1278 --- Overview.html 22 Aug 2008 07:12:49 -0000 1.1277 +++ Overview.html 22 Aug 2008 19:57:37 -0000 1.1278 @@ -26450,7 +26450,7 @@ </dl> <p>The <code><a href="#script1">script</a></code> element allows authors to - include dynamic script and script data in their documents. + include dynamic script and data blocks in their documents. <p>When used to include dynamic scripts, the scripts may either be embedded inline or may be imported from an external file using the <code @@ -26461,18 +26461,18 @@ href="#type11">type</a></code> attribute is present, its value must be the type of the script's language. - <p>When used to include script data, the script data must be embedded - inline, the format of the data must be given using the <code - title=attr-script-type><a href="#type11">type</a></code> attribute, and - the <code title=attr-script-src><a href="#src9">src</a></code> attribute - must not be specified. + <p>When used to include data blocks, the data must be embedded inline, the + format of the data must be given using the <code title=attr-script-type><a + href="#type11">type</a></code> attribute, and the <code + title=attr-script-src><a href="#src9">src</a></code> attribute must not be + specified. <p>The <dfn id=type11 title=attr-script-type><code>type</code></dfn> - attribute gives the language of the script or format of the script data. - If the attribute is present, its value must be a valid MIME type, - optionally with parameters. The <code title="">charset</code> parameter - must not be specified. (The default, which is used if the attribute is - absent, is "<code title="">text/javascript</code>".) <a + attribute gives the language of the script or format of the data. If the + attribute is present, its value must be a valid MIME type, optionally with + parameters. The <code title="">charset</code> parameter must not be + specified. (The default, which is used if the attribute is absent, is + "<code title="">text/javascript</code>".) <a href="#references">[RFC2046]</a> <p>The <dfn id=src9 title=attr-script-src><code>src</code></dfn> attribute, @@ -26892,6 +26892,26 @@ way as the <code><a href="#textcontent">textContent</a></code> DOM attribute. + <div class=example> + <p>In this example, two <code><a href="#script1">script</a></code> + elements are used. One embeds an external script, and the other includes + some data.</p> + + <pre><script src="game-engine.js"></script> +<script type="text/x-game-map"> +........U.........e +o............x....e +.....x.....xxx....e +.x..xxx...xxxxx...e +</script></pre> + + <p>The data in this case might be used by the script to generate the map + of a video game. The data doesn't have to be used that way, though; maybe + the map data is actually embedded in other parts of the page's markup, + and the data block here is just used by the site's search engine to help + users who are looking for particular features in their game maps.</p> + </div> + <h5 id=scriptingLanguages><span class=secno>4.10.1.1. </span>Scripting languages</h5>
Received on Friday, 22 August 2008 19:58:13 UTC