/** * Default implementation uses the root element of the document associated with BridgeContext. * This is useful for CSS case. */ protected Element getBaseElement(BridgeContext ctx) { SVGDocument d = (SVGDocument) ctx.getDocument(); return d.getRootElement(); }
/** * Creates a new BaseScriptingEnvironment. * * @param ctx the bridge context */ public BaseScriptingEnvironment(BridgeContext ctx) { bridgeContext = ctx; document = ctx.getDocument(); docPURL = new ParsedURL(((SVGDocument) document).getURL()); userAgent = bridgeContext.getUserAgent(); }