{"id":18808,"date":"2016-11-21T20:50:10","date_gmt":"2016-11-21T20:50:10","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=18808"},"modified":"2018-06-20T19:33:38","modified_gmt":"2018-06-20T19:33:38","slug":"web-design-a-javascript-wrapper-for-svg-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/web-design-a-javascript-wrapper-for-svg-in-wordpress\/","title":{"rendered":"Web design:  a JavaScript wrapper for SVG in WordPress"},"content":{"rendered":"<h1>The tutor shows an example of a wrapper program in action.<\/h1>\n<div id=\"susie\" style=\"width:420px;height:150px;display:block;margin:auto\"><\/div>\n<p><script src=\"\/..\/svg\/svg_wrapper_nov21.js\"><\/script><\/p>\n<p>To my knowledge, a <em>wrapper<\/em> is a program that hides a function that the managing system can&#8217;t handle.  The &#8220;wrapping&#8221; is code that the managing system recognizes as the responsibility of another service, which it calls.  The called service then executes the code inside the &#8220;wrapping&#8221;.<\/p>\n<p>Here&#8217;s a example:  SVG in WordPress.  I&#8217;ve never gotten SVG to work in WordPress. (I&#8217;ve heard there are plugins for it, but haven&#8217;t tried any.)  Yet, SVG is supported by the browser.  I asked, &#8220;Could I embed SVG in JavaScript, which WordPress will turn over to the browser?&#8221;<\/p>\n<p>Looking at the graphic above, the answer seems to be &#8220;yes&#8221;.  The JavaScript wrapper program works:  it allows SVG to be executed onto a WordPress page, when WordPress itself (to my knowledge) won&#8217;t do so without a plugin.<\/p>\n<p>Source:<\/p>\n<p><a href=\"http:\/\/tutorials.jenkov.com\/svg\/textpath-element.html\">jenkov.com<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/en\/docs\/Web\/SVG\/Element\/textPath\">Mozilla Foundation<\/a><br \/>\n<a href=\"http:\/\/www.w3schools.com\/graphics\/svg_path.asp\">w3schools.com<\/a><br \/>\n<a href=\"http:\/\/softwareengineering.stackexchange.com\/questions\/16445\/what-is-a-wrapper-program\">stackexchange.com<\/a><\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutor shows an example of a wrapper program in action. To my knowledge, a wrapper is a program that hides a function that the managing system can&#8217;t handle. The &#8220;wrapping&#8221; is code that the managing system recognizes as the &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/web-design-a-javascript-wrapper-for-svg-in-wordpress\/\"> <span class=\"screen-reader-text\">Web design:  a JavaScript wrapper for SVG in WordPress<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105,1745,1713,2040,837,1855],"tags":[2041],"class_list":["post-18808","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-javascript-computer-science","category-javascript","category-svg","category-web-design","category-web-programming","tag-what-is-a-wrapper-program"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=18808"}],"version-history":[{"count":27,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18808\/revisions"}],"predecessor-version":[{"id":35190,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18808\/revisions\/35190"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=18808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=18808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=18808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}