ev.initEvent("SVGLoad", false, false);
EventTarget t = (EventTarget)elt;
final String s =
elt.getAttributeNS(null, SVGConstants.SVG_ONLOAD_ATTRIBUTE);
EventListener l = null;
if (s.length() > 0) {
if (checkCanRun) {
// Check that it is ok to run embeded scripts
checkCompatibleScriptURL(lang, docPURL);
checkCanRun = false; // we only check once for onload handlers
}
l = new EventListener() {
public void handleEvent(Event evt) {
try {
interp.bindObject(EVENT_NAME, evt);
interp.bindObject(ALTERNATE_EVENT_NAME, evt);
interp.evaluate(new StringReader(s));