-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripted SVG #2098
Comments
The issue was discussed in a meeting on 2022-03-25 List of resolutions:
View the transcript2. Scripted SVG (issue epub-specs#2098)See github issue epub-specs#2098. Dave Cramer: we can have scripted Top Level Content document, and scripted svg in iframe is container-constrained, but what about other cases?. Matt Garrish: so is scripted svg valid? And what about RS support for scripting? Are we saying you can put scripted SVG anywhere, but it might not be supported?. Dave Cramer: has anyone here ever put scripted SVG into an epub?. Brady Duga: it's a weird question, because its scripting, so it's already not guaranteed to work. Dave Cramer: i presume there have not been epubcheck bugs specifically about this?. Matt Garrish: no, it's valid, so we don't say you can't do it. But this doesn't fall into container-constrained. Ivan Herman: we should say yes it's allowed, and we should write some tests for it. Matt Garrish: no, scripting won't work in img tag. Brady Duga: i think container-constrained was meant to make is to that the element wouldn't change its size, that it wouldn't interact with the DOM, or break anything else. Ivan Herman: so, as of right now, using object is illegal?. Brady Duga: it's fine, it just doesn't count as container-constrained. Matt Garrish: we say you should support container-constrained scripting, but may support scripting in the content document. Dave Cramer: i found the part of HTML spec that says you can't have scripted svg in img. Ivan Herman: okay, so what's the resolution?. Dave Cramer: we wait to see what tests tell us?. Ivan Herman: if we are responding to a specific question (as it says in issue) then we should make an editorial comment. Matt Garrish: we can mention that object does not count as container constrained. Brady Duga: it sounds like a good idea to add clarifying text, but is there something in our spec that makes people believe that putting something in an object tag would make something container-constrained?. Matt Garrish: content document is silent on whether or not it is valid to put scripted svg in object, you'd need to go to RS spec to see that. Brady Duga: i'm fine with making people who want to use scripting in epub read RS spec. Ivan Herman: my position is that a real question came up, so that means the core spec isn't clear enough. We should do something about that.. Zheng Xu (徐征): what does the RS need to do beyond a normal web browser?. Dave Cramer: i don't think there's anything. Ivan Herman: only minor thing is that an svg file should have access to the epubreadingsystem object. Zheng Xu (徐征): in terms of bad usage of svg scripting, I don't know how to avoid this. Ivan Herman: as soon as we allow scripting, we can no longer prevent users from shooting themselves in the foot with it.
|
I was just asked a question about embedding scripted svg and couldn't decipher exactly what is valid from the specification.
It's clear that you can have a scripted Top-Level SVG Content Document. And we say that an SVG with script referenced from an HTML iframe element is container-constrained.
But what happens in other cases? Can you embed an SVG with scripting using
object
or is that invalid? Can you embed an SVG with scripting inimg
even though the scripting won't work, or should that be reported as invalid?The text was updated successfully, but these errors were encountered: