[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extending svg.el
From: |
Lars Magne Ingebrigtsen |
Subject: |
Re: Extending svg.el |
Date: |
Wed, 03 Dec 2014 20:09:46 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Ulf Jasper <address@hidden> writes:
> However, in the end I only used very few
> functions from 'svg.el', but wrote a handful of new functions and even
> "re-invented" some functions (e.g. 'svg-line'). The reason is that many
> of the functions in 'svg.el' produce side-effects (via 'svg-append' and
> 'svg-possibly-update-image'). Besides that adding attributes to svg
> primitives appears to have an effect on the containing xml tree (via
> 'svg-arguments').
Yes, svg.el is not an immutable functional-type library, but an
object-oriented one that works on an XML tree.
If you want a function variant of the same, you can just copy the DOM
before you pass it in. Perhaps add a `dom-copy' function to dom.el?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Extending svg.el, Ulf Jasper, 2014/12/03
- Re: Extending svg.el,
Lars Magne Ingebrigtsen <=