Not sure if this is the best place to talk about this, or if a .todo file would be better, but we've been discussing splitting up Uize.Node into multiple files in order to reduce the amount of code Uize.Widget needs. Uize.Node would become an aggregator method in the same way Uize.String has become one for backwards compatibility.
Here's my proposal (names are still TBD):
Uize.Dom - new namespace (like Uize.Str)
Uize.Dom.Common - essentially the commonly-used methods (majority of which Uize.Widget needs)
methods:
- display
- doForAll
- find
- getById
- getInnerHtml (doesn't exist, but seems like it should for parity)
- getStyle
- getValue
- injectHtml
- isNode
- isOnNodeTree (used by
find and other methods)
- joinIdPrefixAndNodeId
- remove
- setClipRect (there is a
setNodeClipRect method which is only used by 3 widgets, so not sure of its worth)
- setInnerHtml
- setOpacity
- setProperties
- setStyle
- setValue
- show
- unwire
- unwireEventsByOwnerId (used by
unwire)
- wire
static properties:
- ieMajorVersion
- isIe
- isMozilla
- isSafari
methods that aren't used by Uize.Widget but don't have a home:
- getDocumentScrollElement
- getText
- showClickable
Uize.Dom.Pos - essentially the positioning stuff
- centerInWindow
- getCoords
- getDimensions
- getEventAbsPos
- setAbsPos
- setAbsPosAdjacentTo
- setCoords
Added to Uize.Math.LogicalPos
Thoughts?
Not sure if this is the best place to talk about this, or if a .todo file would be better, but we've been discussing splitting up
Uize.Nodeinto multiple files in order to reduce the amount of codeUize.Widgetneeds.Uize.Nodewould become an aggregator method in the same wayUize.Stringhas become one for backwards compatibility.Here's my proposal (names are still TBD):
Uize.Dom- new namespace (likeUize.Str)Uize.Dom.Common- essentially the commonly-used methods (majority of whichUize.Widgetneeds)methods:
findand other methods)setNodeClipRectmethod which is only used by 3 widgets, so not sure of its worth)unwire)static properties:
methods that aren't used by
Uize.Widgetbut don't have a home:Uize.Dom.Pos- essentially the positioning stuffAdded to
Uize.Math.LogicalPosThoughts?