• I’m use SVG and foreignobject. Sctructure code:
    <foreignObject width=”40%” height=”33%” y=”25%”>
    <body>
    <header class=”page-title”>
    <hgroup>
    <div class=”title-wrap”>
    <h1>TITLE</h1>
    </div>
    </hgroup>
    </header>
    </body> -> After this tag insert autoptimize JS link
    </foreignObject>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter marycka9

    (@marycka9)

    This comment is intended for the most part for those who will face the same problem

    Plugin Author Frank Goossens

    (@futtta)

    hi marycka9; you can change the “injection-point” for AO’s JS using the API, e.g.;

    
    add_filter('autoptimize_filter_js_replacetag','change_js_replacetag',10,1);
    function change_js_replacetag($replacetag) {
            return array("</html>","before");
            }

    will inject the AO’ed JS before the closing HTML-tag.

    hope this helps,
    frank

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Autoptimize JS after in foreignobject’ is closed to new replies.