Create Element and Event wrappers
Reported by John-David Dalton | July 3rd, 2009 @ 06:00 PM
Elements will not be manually extended in Fuse.
We should create an element wrapper to handle element
manipulations.
// pseudo code
Fuse.addNS('Dom');
Fuse.Dom.Node = Fuse.Class(Fuse.Dom, {
'constructor': (function() {
function Node(element) {
if (typeof element === 'string')
element = Fuse._doc.getElementById(element || expando);
if (typeof element.getUniqueID === 'function')
return cache[element.getUniqueID()];
this.raw = element;
}
return Node;
})(),
});
Fuse.Dom.Node.Plugin.hide = function hide() {
var element = this.raw,
display = element.style.display;
if (display && display !== 'none')
element._originalDisplay = display;
element.style.display = 'none';
return element;
};
Comments and changes to this ticket
-
John-David Dalton July 3rd, 2009 @ 06:03 PM
- Title changed from Create Element wrappers to Create Element and Event wrappers
-
John-David Dalton April 15th, 2010 @ 02:38 AM
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
JavaScript frameworks share similar features and functionality such as DOM manipulation, event registration, and CSS selector engines. FuseJS attempts to incorporate the strengths of these frameworks into one stable, efficient, and optimized core JavaScript framework.