WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=87eea3f85d1e8c5c752e5889b5c706248b8b2269
commit 87eea3f85d1e8c5c752e5889b5c706248b8b2269 Author: Larry de Oliveira Lira Junior <[email protected]> Date: Thu Dec 10 07:44:14 2015 -0800 Wiki page javascript_tutorial changed with summary [] by Larry de Oliveira Lira Junior --- pages/tutorial/javascript_tutorial.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pages/tutorial/javascript_tutorial.txt b/pages/tutorial/javascript_tutorial.txt index 1170c0c..92dedd1 100644 --- a/pages/tutorial/javascript_tutorial.txt +++ b/pages/tutorial/javascript_tutorial.txt @@ -61,7 +61,7 @@ Now you are ready to use the modules in node.js, use ''require'' to import modul > elm = require("elm") </code> -===Button Example=== +====Button Example==== <note> You find this example in ''elementary_source/src/examples/button_example_00.js'' @@ -69,12 +69,12 @@ You find this example in ''elementary_source/src/examples/button_example_00.js'' Import Elementary module <code javascript> -Elm = require('elm').Elm; +elm = require('elm'); </code> Create a new Window with autohide (the window is hide automatic when close is pressed): <code javascript> -win = new Elm.WinStandard(null); +win = new elm.Elm.WinStandard(null); win.setTitle("Hello, World!"); win.setAutohide(true); </code> @@ -103,4 +103,15 @@ To finish is needy show all elements, for that use ''setVisible(true)'' btn.setVisible(true); win.setSize(240, 60); win.setVisible(true); -</code> \ No newline at end of file +</code> + +====Twitter Example==== + +This sample is more complex and we need some external requirements, the request module and twitter module, for that use ''npm'' (node package manager). + +<code bash> +nom install request +npm install twitter +</code> + +<note tip>npm is installed by default with Node.js</note> \ No newline at end of file --
