本文整理汇总了Python中pyjamas.DOM.getBooleanAttribute方法的典型用法代码示例。如果您正苦于以下问题:Python DOM.getBooleanAttribute方法的具体用法?Python DOM.getBooleanAttribute怎么用?Python DOM.getBooleanAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.DOM
的用法示例。
在下文中一共展示了DOM.getBooleanAttribute方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: isReadonly
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import getBooleanAttribute [as 别名]
def isReadonly(self):
try:
return not DOM.getBooleanAttribute(self.getElement(), "readOnly")
except TypeError:
return True
except AttributeError:
return True
示例2: isChecked
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import getBooleanAttribute [as 别名]
def isChecked(self):
if self.isAttached():
propName = "checked"
else:
propName = "defaultChecked"
return DOM.getBooleanAttribute(self.inputElem, propName)
示例3: isEnabled
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import getBooleanAttribute [as 别名]
def isEnabled(self):
try:
return not DOM.getBooleanAttribute(self.getElement(), "disabled")
except TypeError:
return True
except AttributeError:
return True
示例4: isEnabled
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import getBooleanAttribute [as 别名]
def isEnabled(self):
return not DOM.getBooleanAttribute(self.inputElem, "disabled")
示例5: hasControls
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import getBooleanAttribute [as 别名]
def hasControls(self):
DOM.getBooleanAttribute(self.getElement(), "controls")
示例6: isItemSelected
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import getBooleanAttribute [as 别名]
def isItemSelected(self, index):
self.checkIndex(index)
option = DOM.getChild(self.getElement(), index)
return DOM.getBooleanAttribute(option, "selected")
示例7: getMultipleSelect
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import getBooleanAttribute [as 别名]
def getMultipleSelect(self):
return DOM.getBooleanAttribute(self.getElement(), "multiple")
示例8: getBoolProp
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import getBooleanAttribute [as 别名]
def getBoolProp(obj, propertyName):
return DOM.getBooleanAttribute(obj, propertyName)