{"id":478,"date":"2008-07-25T12:11:20","date_gmt":"2008-07-25T17:11:20","guid":{"rendered":"http:\/\/blog.codedread.com\/archives\/2008\/07\/25\/parameterizing-svg-and-html\/"},"modified":"2008-07-25T12:11:20","modified_gmt":"2008-07-25T17:11:20","slug":"parameterizing-svg-and-html","status":"publish","type":"post","link":"https:\/\/www.codedread.com\/blog\/archives\/2008\/07\/25\/parameterizing-svg-and-html\/","title":{"rendered":"Parameterizing SVG and HTML"},"content":{"rendered":"<p><object type=\"image\/svg+xml\" width=\"100\" height=\"100\" align=\"right\" hspace=\"10\" data=\"http:\/\/codedread.com\/clipart\/html.svgz\"><span\/><\/object><a href=\"http:\/\/my.opera.com\/hallvors\/blog\/\">Hallvord R.M. Steen<\/a> (an <a href=\"http:\/\/www.opera.com\/\">Opera<\/a> employee and member of the <a href=\"http:\/\/www.w3.org\/html\/wg\/\">HTML WG<\/a>) was kind enough to create a <a href=\"http:\/\/www.w3.org\/Bugs\/Public\/show_bug.cgi?id=5846\" title=\"Allow embedded SVG to get the parameters sent in from HTML:object\">bug<\/a> regarding an issue I had raised a few months back.  It is currently not possible inside an embedded SVG to determine the <a href=\"http:\/\/www.w3.org\/TR\/REC-html40\/struct\/objects.html#h-13.3.2\">parameters<\/a> sent in from <a href=\"http:\/\/www.w3.org\/TR\/REC-html40\/struct\/objects.html#h-13.3\">HTML:object<\/a> if the two documents are on different domains.  This appears to be a hole in the HTML4 spec, which doesn't really address cross-domain security concerns for the HTML:object element.<!--more--><\/p>\n<p>At the moment, the issue is dead in the water.  <a href=\"http:\/\/ln.hixie.ch\/\">Ian Hickson<\/a> suggested that <a href=\"http:\/\/tools.ietf.org\/html\/rfc3986#section-3.4\" title=\"Query Part of the Uniform Resource Identifier\">query parameters<\/a> could solve this issue.  However, query parameters are part of the <abbr title=\"Uniform Resource Identifier\">URI<\/abbr>.  In my experiments with PHP, I found that query parameters are a good way to ensure the browser actually re-fetches a document and doesn't rely on the document in the cache.   This means that using query parameters would defeat one of the purposes of parameterizing the SVG in the first place (one document in the browser cache that could be used for many purposes).<\/p>\n<p>It's sad because plugins like Flash have the luxury of being able to <a href=\"http:\/\/kb.adobe.com\/selfservice\/viewContent.do?externalId=tn_16417\">pass parameters<\/a> into their content, but we can't do that for content the browser understands natively (like SVG and HTML).  I failed to convince the <a href=\"http:\/\/realtech.burningbird.net\/semweb\/accessibility-and-microformats\/#comment-471\">benevolent dictator<\/a> that this is an important capability that the open web stack lacks.<\/p>\n<p>I think this would be a nice way to turn bits of HTML\/SVG into simple components without requiring script on the embedding side and without requiring heavier technologies like XBL and\/or waiting for browser support of postMessage().  For example, it seems like web page authors using things like Adsense could benefit from this by not having to include foreign script in their pages, but apparently Google has no interest in this.<\/p>\n<p>Eric Meyer's <a href=\"http:\/\/meyerweb.com\/eric\/thoughts\/2008\/07\/23\/any-element-linking-demo\/#comment-395213\">link-anywhere proposal<\/a> inspired me to at least float this issue in my blog in case someone else thinks it important.  For now, <a href=\"http:\/\/www.w3.org\/Bugs\/Public\/show_activity.cgi?id=5846\">I'm tired<\/a>.  Hm, I wonder if I can use the <a href=\"http:\/\/ajaxian.com\/archives\/windowname-meet-dojoxiowindowname\">window.name hack<\/a>...<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hallvord R.M. Steen (an Opera employee and member of the HTML WG) was kind enough to create a bug regarding an issue I had raised a few months back. It is currently not possible inside an embedded SVG to determine the parameters sent in from HTML:object if the two documents are on different domains. This [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,43,25,11,28],"tags":[98,198,154,159],"class_list":["post-478","post","type-post","status-publish","format-standard","hentry","category-adobe","category-ria","category-software","category-technology","category-web","tag-html","tag-svg","tag-w3c","tag-whatwg"],"_links":{"self":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/478","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/comments?post=478"}],"version-history":[{"count":0,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/478\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/media?parent=478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/categories?post=478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/tags?post=478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}