Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

HTML5 Shim for ToscaWidgets 2

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 tests
Octocat-spinner-32 tw2
Octocat-spinner-32 .gitignore
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.md
Octocat-spinner-32 setup.cfg
Octocat-spinner-32 setup.py
Octocat-spinner-32 setup_ext.py
README.md

HTML5 Shim for ToscaWidgets2

About

Allows HTML5-Shim to be added as a widget-specific or global resource for compatability with Internet Explorer versions lower than 9.0.

Using tw2.util.html5shim

Inside ToscaWidget2 Widgets

In the widgets.py file (or a resource declaration file if you use one) add following:

Top of file:

from tw2.util.html5shim import html5shim_js

In the widget declaration add html5shim_js to the resources attribute like so:

class YourWidget(tw2.core.Widget):
    resources = [html5shim_js, other_res, another_res]

Turbogears 2

If you need HTML5-Shim to be injected globally, add the following to projectname/base/lib.py

Top of file:

from tw2.util.html5shim import html5shim_js

Above the return statement in BaseController.__call__:

html5shim_js.inject()
Something went wrong with that request. Please try again.