|
STools | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--SUtilities
Defined in SUtilities.js
Version: 1.0
Author: deltapositive (deltapositive@yahoo.fr)
Field Summary | |
<static> string |
IMAGE_PREFIX_URL
This is a constant you have to set. This constant is a prefix for all images used by the STools. Must not end with '/'. |
<static> boolean |
IS_IE
Boolean constant telling is user uses Internet Explorer or not. This constant is used by all SUtilities, but you may have to use it also. |
<static> Object |
mouseX
|
<static> Object |
mouseY
|
Constructor Summary | |
SUtilities
()
SUtilities is part of the STools. Copyright 2005 STools Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SUtilities is a static class with general contants and methods. |
Method Summary | |
<static> void
|
attachEvent(<HTMLElement> element, <string> event, <function> handler)
Attach an handle of an event (such as 'click' or 'mousemove') on an element |
<static> string
|
debug(<Object> elt)
This method is proposed for debug purposes. Return all properties of an object. Exemple: alert( SUtilities.debug(document) ) |
<static> void
|
detachEvent(<HTMLElement> element, <string> event, <function> handler)
Detach an handle of an event (such as 'click' or 'mousemove') from an element |
<static> Object
|
getChildrenByTagName(<HTMLElement> elt, <string> tag)
Get the children, grand children... |
<static> Object
|
getDirectChildrenByTagName(<HTMLElement> elt, <string> tag)
Get the children of a given html element that have a tagname. |
<static> Object
|
getParentWithTag(<HTMLElement> elt, <string> tag)
Get the parent of an element that match a tagname. |
<static> void
|
loadScript(<string> url, <Document> _document, <function> onLoadListener)
Loads dinamically a script. |
<static> void
|
loadStyle(<string> url, <Document> _document, <function> onLoadListener)
Loads dinamically a css. |
Field Detail |
<static> string IMAGE_PREFIX_URL
<static> boolean IS_IE
<static> Object mouseX
<static> Object mouseY
Constructor Detail |
SUtilities()
Method Detail |
<static> void attachEvent(<HTMLElement> element, <string> event, <function> handler)
element
- The html element to put the event handler on
event
- The name of the event to check ('click', 'dblclick', ...)
handler
- The function to launch when the event is fired on the element.
<static> string debug(<Object> elt)
elt
- Object to inspect.
<static> void detachEvent(<HTMLElement> element, <string> event, <function> handler)
element
- The html element to remove the event handler from
event
- The name of the event to check ('click', 'dblclick', ...)
handler
- The function that was launched when the event is fired on the element.
<static> Object getChildrenByTagName(<HTMLElement> elt, <string> tag)
elt
- The current html element.
tag
- The tagname of the descendants to obtain.
<static> Object getDirectChildrenByTagName(<HTMLElement> elt, <string> tag)
elt
- The current html element.
tag
- The tagname of the children to obtain.
<static> Object getParentWithTag(<HTMLElement> elt, <string> tag)
elt
- The current html element.
tag
- The tagname of the ancestor to obtain.
<static> void loadScript(<string> url, <Document> _document, <function> onLoadListener)
url
- the url to the script to load.
_document
- the document where to load the script. Can be null: default value is main document.
onLoadListener
- this function will be called when the script is correctly loaded. Can be null.
<static> void loadStyle(<string> url, <Document> _document, <function> onLoadListener)
url
- the url to the css to load.
_document
- the document where to load the css. Can be null: default value is main document.
onLoadListener
- this function will be called when the css is correctly loaded. Can be null.
|
STools | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |