-
Notifications
You must be signed in to change notification settings - Fork 132
SVG 2 new features
Nikos Andronikos edited this page Aug 3, 2016
·
15 revisions
I'd like to move this into a proper matrix where we can list implementer feedback and support, but for now here's a basic list of what is new in SVG 2.
Note: this list is still being built and is incomplete.
- Added "length" attribute and indexed property access to all list interfaces.
- Replace SVGMatrix with DOMMatrix or DOMMatrixReadOnly
- Replace SVGRect with DOMRect or DOMRectReadOnly
- Replace SVGPoint with DOMPoint or DOMPointReadOnly
- Moved members from SVGStylable and SVGLangSpace to SVGElement and removed those interfaces
- Added SVGGraphicsElement
- Moved members from SVGLocatable and SVGTransformable to SVGGraphicsElement and removed those interfaces
- Added SVGGeometryElement with isPointInFill and isPointInStroke methods
- Removed SVGExternalResourcesRequired interface
- Removed SVGColor and SVGICCCOlor interfaces
- Removed getPresentationAttribute method from SVGElement
- Add tabindex attribute, and focus and blur methods, to SVGElement
- Add activeElement attribute to Document
- SVGElement now inherits GlobalEventHandlers from HTML
- extend getBBox with an argument that controls inclusion of fill or stroke
- Remove xmlbase, xmllang, and xmlspace attributes from SVGElement interface
- Remove SVGViewSpec interface
- Remove getTransformToElement from SVGGraphicsElement
- Allow getCTM on outermost svg element
- Make animVal an alias for baseVal and no longer reflect animated value
- Added dataset attribute to SVGElement
- Moved methods pathLength, getTotalLength, and getPointAtLength to SVGGeometryElement
- Removed SVGElementInstance and SVGElementInstanceList interfaces
- Removed currentView and useCurrentView properties on SVGSVGElement
- Added SVGUnknownElement
- Removed the viewport attribute from SVGSVGElement
- Allow the script element anywhere
- Add crossorigin attribute to the image and script elements
- Whitespace now includes form feed (U+000C) to align with HTML and CSS
- Allow auto for width and height on image
- Removed externalResourcesRequired attribute
- Add lang attribute
- Include WAI-ARIA attributes
- width and height on svg element are now presentation attributes
- Removed baseProfile and version attributes from the svg element
- Removed requiredFeatures attribute
- unknown elements are treated as a g or tspan element
- Removed xml:base
- Allow custom data attributes on all SVG elements
- Inclusion of audio and video elements
- Mesh gradients
- Hatch path paint server
- Multiple paints for fill and stroke.
- 'context-fill' and 'context-stroke' values for 'fill' and 'stroke' These allow, for example, markers to inherit the stroke color.
- Marker auto-start-reverse
Has implementations in Firefox, WebKit, Blink, and Inkscape - Complete overhaul of text layout
- CSS based multi-line text:
- Text wrapping given a fixed width/height.
- Text in a shape.
- Text-on-a-path changes:
- Text on a shape.
- Text on either side of a path.
- Todo: Add more
- CSS based multi-line text:
- Font features (alternative glyphs, etc.)
- Path features:
- Auto-closing paths.
- New line joins (miter-clip, arcs)
- z-index support
- SVG Root and foreignObject are no longer overflow:hidden by default
- Allow scroll bars to be shown for overflow:auto in special cases
- Allow scroll bars when overflow:scroll is set on svg elements
- Use elements defined in terms of Web Components
- use elements may now reference an entire document
- Define WAI-ARIA semantics
- ordering of systemLanguage preferences follows SMIL allowReorder definition
- masks, filters and other graphics effects may now be applied to tspan and textPath elements
- methods suspendRedraw, unsuspendRedraw, and unsuspendRedrawAll on SVGSVGElement
- rootElement attribute
- forceRedraw method on SVGSVGElement
- deselectAll method on SVGSVGElement