Here was an old thread I had with someone who was in some SVG standards group
---------- Forwarded message ---------- From: Timothy Rowley <[email protected]> Date: Wed, Apr 18, 2007 at 5:30 PM Subject: Re: Laszlo, Firefox, and SVG To: Henry Minsky <[email protected]> Cc: [email protected], Platform Team < [email protected]> "Henry Minsky" <[email protected]> wrote on 04/18/2007 03:49:06 PM: > Here is a short summary of the requirements our OpenLaszlo kernel > needs from the platform. > > I can go into detail on any of these if you have questions, but I > wanted to get this out quickly so you have an idea of what we're > looking for. We're able to use the > existing DOM event model pretty well, so it's mostly a question of filling out > the missing features (mostly on text) that we listed below. Some specific comments below, but the general feeling I have is that you're not familiar with the SVG 1.1 Full or SVG 1.2 Tiny specifications. You need to decide what you want to target, SVG1.1+ or SVGT1.2+. The latter might possibly be of more interest to you since many mobile phones now are in the process of implementing that (though I'm not sure how many of them have JS). SVGT1.2 adds <textArea> and editable text, which seem to be two items of interest to you, but on the other hand has an extremely reduced DOM API for dealing with text. It might help to include a SVG WG member in this conversation - I can CC one if you'd like. > Text APIs > (not required, but desired) CSS style support API Not sure what you're requesting here. > Multiline (Input) Text Area Is the SVGT 1.2 <textArea> sufficient for your needs? > Text Selection API, for input and regular text > get selected text, get/set selection position, get/set size Right, currently we don't support selection in SVG. > Text Metrics: > set size style, font > API to measure width, height Font style, size can be set with the normal css properties. The SVG text module has numerous APIs for measuring/manipulating text which we alreayd implement. > Multiline Wrapping Text: > specify width to wrap at > line height, interline spacing > ask how tall the text content is > ask how tall a given string would be if displayed > scrolling text, get/set scroll pos, max scrollpos The SVGT 1.2 <textArea> is nonscrolled. It does support a line-increment property (subset of CSS line-height). The SVGT uDOM doesn't have any API specific for this element. > Input Text: > > events: > focused/blurred ? > key down / up > onclick > onmousedown/over/out onkeyup/onkeydown is a nonstandard Adobe thing. Can't you use XML events instead for that? > Get/Set max Input Text string length > Enable/disable input text > API to deselect/select (see below) > Set text width/height Editability can be flipped by modification of the "editable" property. Text width/height - do you mean the size of the <textArea>? > Set text color, background color Text fill/stroke color can be set, but the background is up to the SVG document to draw. > Hide/Display border of input text There is no idea of a border in SVG - it's up to the document to draw whatever decorations it likes. > Keyboard kernel APIs > onkeydown, onkeyup (on a per-element basis and global) > including modifier keys > Can you return false from a keydown, and have the keystroke not > appear in the input text field? The SVGT 1.2 "editable" property indicates that DOM3 text/key events are dispatched, so if you had an eventlistener for those you should be able to intercept if needed. > Image Loading: > need a way to get image size of loaded image > would like a load progress indicator, but not required > need "load done" or "error" event when image loading > > Data Loading: > Can you support XMLHTTPRequest (or call through to the containing browser)? > Is there a DOM API for loaded XML data? Firefox/Mozilla supports XMLHTTPRequest, and DOMParser can be used to manipulate XML. > > What is the recommended way to communicate between the enclosing web > page dhtml and the > SVG object? Are you talking about a mixed-namespace document, or SVG embedded with <object>, <embed>, <iframe>? -- Henry Minsky Software Architect [email protected]
