Hacker News new | past | comments | ask | show | jobs | submit login

That sounds like a workable model for vector graphics in browsers; it's just not describing SVG's design. It very deliberately was meant to contain not just vector model, but also a dynamic/interactive environment.

From the standard: https://www.w3.org/TR/SVG11/intro.html

"Sophisticated applications of SVG are possible by use of a supplemental scripting language which accesses SVG Document Object Model (DOM), which provides complete access to all elements, attributes and properties. A rich set of event handlers such as ‘onmouseover’ and ‘onclick’ can be assigned to any SVG graphical object. Because of its compatibility and leveraging of other Web standards, features like scripting can be done on XHTML and SVG elements simultaneously within the same Web page."




But we're explicitly criticizing SVG's design! SVG doesn't contain horrible things by accident of implementation, it was specified to contain those horrible things.

Defending against this criticism by saying the behavior is in the spec is not relevant.


I think you're missing that it was a design goal to have that support in the spec. Scripting was a requirement, not a design choice.


Then Javascript inside SVG should not have any power over the HTML page it's contained in.


At the time, it's not what people wanted. It was pretty common for Flash apps to have access to the whole page.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: