Esempio n. 1
0
File: base.py Progetto: APSL/Adjax
 def hide(self, element=None, name=None):
     """ Hides the given DOM element.
         The DOM element is specified using css identifiers.
         Some javascript libraries may have an extended syntax, 
         which can be used if you don't value portability.
     """
     if name is not None:
         self.hide_data.append('.'+named_key(name))
     else:
         if element is None:
             return TypeError('replace() takes 1 argument, 0 provided.')
         self.hide_data.append(element)
Esempio n. 2
0
 def hide(self, element=None, name=None):
     """ Hides the given DOM element.
         The DOM element is specified using css identifiers.
         Some javascript libraries may have an extended syntax, 
         which can be used if you don't value portability.
     """
     if name is not None:
         self.hide_data.append('.' + named_key(name))
     else:
         if element is None:
             return TypeError('replace() takes 1 argument, 0 provided.')
         self.hide_data.append(element)
Esempio n. 3
0
File: base.py Progetto: APSL/Adjax
 def replace(self, element=None, html=None, name=None, value=None):
     """ Replace the given DOM element with the given html. 
         The DOM element is specified using css identifiers.
         Some javascript libraries may have an extended syntax, 
         which can be used if you don't value portability.
     """
     if name is not None:
         if value is None:
             return TypeError('replace() takes two arguments, "value" parameter missing')
         self.replace_data['.'+named_key(name)] = value
     else:
         if element is None or html is None:
             return TypeError('replace() takes two arguments')
         self.replace_data[element] = html
Esempio n. 4
0
 def replace(self, element=None, html=None, name=None, value=None):
     """ Replace the given DOM element with the given html. 
         The DOM element is specified using css identifiers.
         Some javascript libraries may have an extended syntax, 
         which can be used if you don't value portability.
     """
     if name is not None:
         if value is None:
             return TypeError(
                 'replace() takes two arguments, "value" parameter missing')
         self.replace_data['.' + named_key(name)] = value
     else:
         if element is None or html is None:
             return TypeError('replace() takes two arguments')
         self.replace_data[element] = html