Clearing the JS-output storage in the page. Should be called for every page when exporting a site, or else the JS will cumulate from precious pages.
(self)
| 351 | # J S |
| 352 | |
| 353 | def clearJs(self): |
| 354 | """Clearing the JS-output storage in the page. Should be called for every page |
| 355 | when exporting a site, or else the JS will cumulate from precious pages. |
| 356 | """ |
| 357 | self._jsOut = [] |
| 358 | self._jsNames = set() # Keep optional js chunck names, so avoid double output. |
| 359 | |
| 360 | def addJs(self, js, name=None): |
| 361 | """Add js to output, if name is None or optional name is not already in self._jsNames. |