Injecting HTML and Javascript to an SVG document

90 views
Skip to first unread message

Debangshu Dey

unread,
Mar 6, 2014, 1:18:34 PM3/6/14
to persona...@googlegroups.com
I have a local website which displays an SVG. I want to modify the DOM by inserting an image at the bottom of the svg frame and want some javascript to run to automate some tasks. So far PW doesn't seem to work on this webpage. Can Jquery run on PW?

Any help will be appreciated.

ericm301

unread,
Mar 10, 2014, 9:16:37 AM3/10/14
to persona...@googlegroups.com
You can 'inject' it into the script using 'eval' but it might mot work the way you expect.
PW does not have 'built-in' support for any library. only native JS. It is also no longer being developed, last I checked.

Debangshu Dey

unread,
Mar 11, 2014, 12:41:39 PM3/11/14
to persona...@googlegroups.com
Thank you for your reply.

Vlad GURDIGA

unread,
Mar 22, 2014, 7:07:17 AM3/22/14
to persona...@googlegroups.com
I’m wondering what exactly did you mean by “So far PW doesn't seem to work on this webpage”.

When I want to add custom behavior to pages, I start with a JS snippet like this:

console.log('I am executed');

Save PW settings, open the console in the tab with the page I’m trying to customize and then refresh it. If I don’t see my message in the console, I have probably messed up the URL regex. If I see the message, I know I got a good start, and I start adding more code in small steps and carry on with the “console.log debugging”. :)
Reply all
Reply to author
Forward
0 new messages