klass.js

Recommend this page to a friend!

      klass.js  >  All threads  >  klass.js  >  (Un) Subscribe thread alerts  
Subject:klass.js
Summary:not native javascript
Messages:3
Author:Jacques SAINT-PIERRE
Date:2013-12-18 17:11:36
Update:2013-12-19 10:34:31
 

  1. klass.js   Reply   Report abuse  
Picture of Jacques SAINT-PIERRE Jacques SAINT-PIERRE - 2013-12-18 17:11:36
require is unknown in javascript we usse it in php.
global[x] is not an array of javascript!

What have we to do to improve this class ?

Thnaks

  2. Re: klass.js   Reply   Report abuse  
Picture of Rafael Lúcio Rafael Lúcio - 2013-12-18 19:26:09 - In reply to message 1 from Jacques SAINT-PIERRE
this is a class used with node-js.

If you want to use this class on the web u must to replace the global object with the window variable and remove the require function and put the .js you want on with the script tag.


  3. Re: klass.js   Reply   Report abuse  
Picture of Jacques SAINT-PIERRE Jacques SAINT-PIERRE - 2013-12-19 10:34:31 - In reply to message 2 from Rafael Lúcio
With node.js it works well but to work on te web there is a lot of changes for example changing Class.create from node.js to prototype.js or to jquery.js.