Re: Javascript data types



thanks, I’ve updated the data type 
Return Value
Returns an object of type Range. 

now “Ready for use”

thx again.

From: Amelia Bellamy-Royds 
Sent: Tuesday, July 15, 2014 1:11 AM
To: Rob^_^ 
Subject: Re: Javascript data types

You're right that an enumeration list is not an ideal way to handle such an open-ended field (any object class name could be a valid value).  However, there are reasons for using an enumeration instead of an open text field: it creates the drop-down list, and it ensures that everyone is using standard spelling and capitalization. 

In the future, one way to handle it would be to replace the enumeration with an automatically-generated list of all pages in a specific category (which covers all DOM + Javascript objects in the wiki plus the basic Javascript datatype pages).  That way, you could use any object for which you had already created the appropriate page, and the two pages would be linked together (so that someone could click on "Returns an object of type RangeError" to find out what properties and methods can be called on a RangeError object).  

I'll look into the possibilities of setting this up when I'm working on creating the templates for the SVG DOM pages.  If I get a good solution I'll apply it to the main DOM pages.

For now, the solution is to add new allowed values to the Property:Javascript_data_type page.  I've added the two you mentioned.  If you come across others, just be sure to double-check spelling and capitalization, and enter it in the list in alphabetical order with the following wiki code:

* [[Allows value::ObjectClassName]]

Thanks for continuing to work through these pages, and for keeping track of all the little problems like this that crop up.  A group of us have agreed to spend the summer re-organizing the issue tracker, so hopefully in the future there will be a more standardized way to point out problems and have people follow-up on them without overwhelming the email list.  Until then, the email list seems to get the job done.


On 14 July 2014 02:35, Rob^_^ <> wrote:



  as Range and RangeError are not in the list at

  I end up with a nonsense Return Value description....

  “Returns an object of type Object” 
  [object Range]

  I am pressed for time, so I have flagged the item as almost ready.... awaiting Range object to js data-types.


  ...seems to me that the js object types should be open to editor discretion as ‘objects’ can be anything one wants....

  var WPO={‘toString’:function(){return ‘[object WPO]’;}}

  there are ‘core’ data-types... number, date, boolean, string, regex and Array, but what were once ‘object’ can now be [object Anything]

  eg. var test=2; typeof test returns ‘number’


Received on Monday, 14 July 2014 20:57:49 UTC