Deprecated: Function set_magic_quotes_runtime() is deprecated in /home4/mfoster/public_html/cb/forums/include/common.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 34
Cross-Browser.com / Notice of upcoming changes!

Cross-Browser.com

X Library Forums

You are not logged in.

Announcement

New user registration is currently disabled.

#1 June 2, 2007 10:56:45 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Notice of upcoming changes!

[EDIT]
X 4.16 includes some of the changes described below. However, the functions were not removed from X but they were removed from x_core.js. For details see the xLibrary revision history.
[/EDIT]


Notice of upcoming changes!



Over the next several releases I'll be weeding out some things that have become useless and/or redundant as well as some things that require too much maintenance on my part. If you have any comments on these upcoming changes - now is the time to make them wink.

x_core.js


This file will not be removed, but some of the functions it contains will be removed.

These functions will be completely removed from X very soon:

xOffsetLeft and xOffsetTop - Use element.offsetLeft and element.offsetTop.

xColor - Use element.style.color and/or xGetComputedStyle.

xBackground - Use element.style.background, element.style.backgroundColor or element.style.backgroundImage and/or xGetComputedStyle.

xZIndex - Use element.style.zIndex and/or xGetComputedStyle.

xParent - Use element.parentNode or element.offsetParent or use xParentNode. Perhaps there should also be an xOffsetParent similar to the xParentNode implementation. If you don't know the difference between parentNode and offsetParent then you should ask.

xShow, xHide, xVisibility and xDisplay - Use the corresponding native style properties and/or xGetComputedStyle.

xStyle will be added to "x_core.js". It can be used instead of xColor, xBackground, xZIndex, xShow, xHide, xVisibility and xDisplay - and has other uses.

The function xClip will be removed from "x_core.js" but will still remain in the "/x/lib/" folder.

x_event.js


This file and the functions it contains will not be removed.

All Other "x_*.js" Files Will Be Removed!


All "x_*.js" files (in the "/x/" folder) other than "x_core.js" and "x_event.js" will be removed soon - possibly in the v4.16 release. However, the functions they contain will not be removed (they are still in the "/x/lib/" folder), except for the following which will be completely removed:

xAppendChild - Use element.appendChild.

xCreateElement - Use document.createElement.

xInnerHtml - Use element.innerHTML or the native DOM methods.

Last edited by MikeFoster (July 3, 2007 8:49:00 pm)

Offline

 

#2 June 2, 2007 11:00:34 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: Notice of upcoming changes!

My reasons for the changes noted above



When I first started the X Library in 2001 all the functions were in one file. That file was named, of course, x.js. As the library grew I began to separate the functions into different files, for example x_core.js, x_event.js, x_drag.js... and there are currently 19 such files. They are contained in the cross-browser.com/x/ folder.

Eventually X grew so much that I had to find some other way of maintaining all the different functions and objects in the library. In March of 2004 I separated all X symbols (variables, functions, object prototypes, object methods and object properties) into individual .js files. Then I started creating a .xml documentation file for every .js file (for details read about the X Structure). Then I wrote some PHP code to allow you to view a symbol's documentation and source code on one web page - and I called it the X Viewer.

The folder cross-browser.com/x/lib/ contains all those .xml and .js files, and this collection of files constitutes the actual X Library. The files x_core.js, x_event.js, etc. are retained merely for convenience. After over 6 years, most of those files are no longer convenient to me, they have become a burden - they require too much maintenance. Additionally, it just doesn't make sense to use them when a better alternative now exists. For example you may include the x_anim.js file in order to perform some animation in your application. It is very unlikely that you will utilize all the animation functions in that file. So instead of including a lot of functions you don't need, just include the specific one you need from the "/x/lib/" folder. For example if you want to use the xAniLine function, instead of this:

<script type='text/javascript' src='/x/x_anim.js'></script>


just do this:

<script type='text/javascript' src='/x/lib/xaniline.js'></script>


Utilize the X Viewer which shows all dependencies for every X symbol.

So all of the "x_*.js" files in the "/x/" folder will be removed except for "x_core.js" and "x_event.js".

Offline

 

#3 June 6, 2007 10:02:35 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: Notice of upcoming changes!

I've modified my first post to better reflect what I've ended up doing.

I've almost finished making these changes. I've went through all the demos and modified them where needed. One thing I noticed while going thru all the demos is that "x_core.js" now has a very good selection of functions. In most situations "x_core.js" and "x_event.js" will be all you need, and together they are only 8663 bytes.

X 4.16 will include all these changes.

Additionally... I'm thinking of removing the button property from the xEvent object. What do you think?

Last edited by MikeFoster (June 8, 2007 7:44:51 pm)

Offline

 

#4 June 8, 2007 7:41:51 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: Notice of upcoming changes!

I forgot to list xDisplay in the first post.

Offline

 

#5 June 15, 2007 9:22:54 am

MaxHeadroom
New Member
Registered: May 24, 2007
Posts: 3

Re: Notice of upcoming changes!

Hi Mike. So are you saying some of the X  library javascript functions are to be replaced with the native W3C DOM functions where they are stable enough now?

Offline

 

#6 June 15, 2007 4:20:20 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: Notice of upcoming changes!

Hi Max,

Yes. Browser support is now such that these functions are no longer needed. In your code, instead of these X functions, use the corresponding native property or method.

Here's a summary:

X Functions that were wrappers around Element methods and properties.
These will be removed from X.

xOffsetLeft, xOffsetTop, xParent, xAppendChild, xCreateElement and xInnerHtml.


X Functions that were wrappers around Style properties.
These will be removed from X.

xColor, xBackground, xZIndex, xShow, xHide, xVisibility and xDisplay.


A new X function that will be added.
xStyle will be added to X and to "x_core.js". It can be used instead of xColor, xBackground, xZIndex, xShow, xHide, xVisibility and xDisplay - and has other uses.

Offline

 

#7 June 27, 2007 9:46:11 am

cvogt
New Member
Registered: June 27, 2007
Posts: 1

Re: Notice of upcoming changes!

If you remove the functions wouldn't that remove support for old browsers that do not have native support? Which would this affect?

P.S. Is there a browser comatibility list for X somewhere?

Offline

 

#8 June 29, 2007 12:10:53 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: Notice of upcoming changes!

Hi cvogt,

Welcome to the X Forums!

This change would only have affected NN4 (and perhaps Opera 5/6), but NN4 support was removed a long time ago. Those functions had become nothing but wrappers around the native property or method.

The closest thing I have to a compatibility list is this standard blurb:

The X core is designed for Opera 5+ (*), Mozilla, Firefox, Safari, WebKit, Internet Explorer 4+, Konqueror, Netscape 4.75+ (**) and browsers with similar object models. Object-detection instead of browser-detection is used exclusively. Currently, I'm testing with the following browsers. X has been tested by others on a wide variety of platforms.

WinXP: Opera 9.20, Firefox 2.0.0.3, Safari 3.0.1 and Internet Explorer 4, 5 and 7.

Win2K: Opera 7.51, FireFox 1.5.0.7 and Internet Explorer 6.

* Op 5/6 quirks support has been removed but the old files are available.
** NN4 support has been removed but the old files are available.

Offline

 

#9 July 3, 2007 8:46:26 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: Notice of upcoming changes!

Update...

The X4.16 release is now available and has some of the changes I have described above. However, I did not remove the functions from X, but I did remove them from x_core.js.

Refer to the xLibrary revision history for details.

Offline

 

Board footer

Powered by PunBB 1.2.15
Copyright © 2002–2005 Rickard Andersson

Expand Restore Select Format Eval Load