Skip to main content

Plugin that allows you to put javascript code evaluated by kss

Project description

collective.kss.inlinejs

If you want to use external js libraries with kss you may have to write a kss plugin (for example create a jQuery porting of some features). When it makes sense you can also use this package and put simple inline javascript code that will be executed.

You can call javascript code from the inlinejs kss command set or configure properly a kss configuration file.

Example usage

From python code:

element = ksscore.getHtmlIdSelector(‘selector’) inline = self.getCommandSet(“inlinejs”) inline.execJs(element, “alert(‘TEST’); alert(node.id); jQuery(…)”)

From a kss configuration file:

img:click {

action-client: inlinejs-effect; inlinejs-effect-code: ‘alert(node.id); alert(“done”); jQuery(…)’; inlinejs-effect-debug: ‘1’; }

TODO

  • Tests coverage

Author

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.kss.inlinejs-1.0.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

collective.kss.inlinejs-1.0-py2.4.egg (11.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page