Were you aware of SVGKit? http://svgkit.sourceforge.net/
Just trying to make sure there won't be a duplication of logic. Jake Helmut Zeilinger wrote: > Hi Per, > > I have tested your fix with the following calls: > > getElementsByTagAndClassName ('tagname', null) => ok > getElementsByTagAndClassName (null, 'classname') => ok > getElementsByTagAndClassName (null, 'classname', 'parentid') => ok > > where the element has one or two classnames (separated by space). > > Thanks for the quick fix! > > Helmut > > > > Per Cederberg schrieb: > > I've just committed a fix to MochiKit.DOM for this in a few places. > > Could you please try with the latest version from the repository to > > make sure that all problems go away? > > > > Cheers, > > > > /Per > > > > On Wed, May 21, 2008 at 11:04 AM, Helmut Zeilinger <[EMAIL PROTECTED]> > > wrote: > > > >> Sorry! > >> > >> It wasn't "getElement" but "getElementsByTagAndClassName" in the form > >> > >> getElementsByTagAndClassName (null, 'some-class') > >> > >> which did / does not work. > >> > >> (Inline SVG (see example below), Firefox 2.00.14, MochiKit 1.4) > >> > >> Error message: > >> "cls.split is not a function" on MochiKit.js line 3079 > >> > >> Plaese give me a hint where / how to start a new trac ticket? > >> > >> > >> Helmut > >> > >> > >> Example SVG: > >> > >> <?xml version="1.0" encoding="UTF-8"?> > >> <svg version="1.1" id="svg-root" > >> xmlns="http://www.w3.org/2000/svg" > >> xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> > >> <style type="text/css"> > >> <![CDATA[ > >> * {font: 8pt Myriad Web, Arial, Verdana} > >> /* Links */ > >> a, *.link {display: inline; padding: 0; text-decoration: > >> none; font-weight: bold; color: rgb(39,65,255); cursor: pointer} > >> ]]> > >> </style> <script type="text/javascript" > >> xlink:href="/js/MochiKit/MochiKit.js" /> > >> > >> </defs> > >> > >> <rect id="rect-1" class="rect-class" x="0" y="0" width="800" height="600" > >> stroke-width="1px" stroke="black" fill="rgb(93%,93%,93%)" /> > >> <line x1="10" y1="500" x2="300" y2="300" stroke-width="2px" stroke="orange" > >> /> > >> > >> <text id="get-element" class="link" x="20" y="20" > >> text-anchor="left">getElement</text> > >> <text id="get-element-by-tag-and-class-1" class="link" x="20" y="30" > >> text-anchor="left">getElementsByTagAndClassName (tag, null)</text> > >> <text id="get-element-by-tag-and-class-2" class="link" x="20" y="40" > >> text-anchor="left">getElementsByTagAndClassName (null, class)</text> > >> > >> <script type="text/javascript"> > >> <![CDATA[ > >> connect ($("get-element"), "onclick", function (e) { logDebug > >> ($("rect-1")) }); > >> connect ($("get-element-by-tag-and-class-1"), "onclick", function (e) { > >> logDebug (getElementsByTagAndClassName('rect', null)) }); > >> connect ($("get-element-by-tag-and-class-2"), "onclick", function (e) { > >> logDebug (getElementsByTagAndClassName(null, 'rect-class')) }); > >> ]]> > >> </script> > >> </svg> > >> > >> > >> Per Cederberg schrieb: > >> > >>> Ok. I don't have any problems with $ or getElement, but then I'm using > >>> Firefox and Safari with inline SVG. Are you using the Adobe plugin? I > >>> think it would be good to create Trac tickets for any issues with > >>> MochiKit SVG integration that you find. > >>> > >>> Cheers, > >>> > >>> /Per > >>> > >>> On Tue, May 20, 2008 at 8:27 AM, Helmut Zeilinger <[EMAIL PROTECTED]> > >>> wrote: > >>> > >>> > >>>> Hi Per, > >>>> > >>>> since some weeks i am working with svg files, which are displayed > >>>> by a web browser. > >>>> > >>>> I tried to do some javascript usind MochiKit, but i realized that some > >>>> functions don't work as expected, like e.g. "getElement". > >>>> > >>>> So i find your work VERY useful !! > >>>> > >>>> But besides the drawing functions, you have been implementing, it would > >>>> also > >>>> be fine to make the rest of MochiKit > >>>> (at least that parts, that have to do with DOM..) compatible to SVG > >>>> files. > >>>> > >>>> Helmut > >>>> > >>>> > >>>> Per Cederberg schrieb: > >>>> > >>>> > >>>>> I've been using MochiKit with embedded SVG images for some time. And > >>>>> to accomplish that, I've also written some helper functions to extend > >>>>> MochiKit. Yesterday I finally got around to cleaning them up and > >>>>> posting them to the Wiki: > >>>>> > >>>>> http://trac.mochikit.com/wiki/MochiKitSVG > >>>>> > >>>>> Please let me know if you find these useful. I'd probably need to > >>>>> write up some example code and create proper documentation if they are > >>>>> suitable for MochiKit 1.5 or similar. I don't think they are mature > >>>>> enough to merit inclusion in version 1.4. > >>>>> > >>>>> Cheers, > >>>>> > >>>>> /Per > >>>>> > >>>>> > >>>>> > >>>> > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---