def dom(self): """ Javascript Functions Return all the Javascript functions defined for an HTML Component. Those functions will use plain javascript by default. This is the only flexible component in which this DOM object can be changed. :return: A Javascript Dom object :rtype: JsHtml.JsHtml """ if self._dom is None: self._dom = JsHtml.JsHtml(self.val, report=self._report) return self._dom
from epyk.core.js.html import JsHtml from epyk.core.js import JsUtils class HtmlComp(object): htmlCode = "test" # ------------------------------------------------------------------------------------------------------------------ # dom = JsHtml.JsHtml(HtmlComp()) f = JsUtils.JsFile("Dom", path=r"../outs") f.writeJs([ dom.hide(), dom.toggle() ]) f.close()