Update an existing raddec in the DOM
482805
function updateRaddec(raddec, tr) {
  let tds = tr.getElementsByTagName('td');
  updateNode(tds[1], prepareEvents(raddec));
  updateNode(tds[2], raddec.rssiSignature[0].receiverId);
  updateNode(tds[3], raddec.rssiSignature[0].rssi);
  updateNode(tds[4], prepareRecDecPac(raddec));
  updateNode(tds[5], new Date(raddec.timestamp).toLocaleTimeString());
  updateVisibility(tr, [ tds[0].textContent, tds[2].textContent ]);
}
235474
function( elem, options, callback ) {
		var old = {};

		// Remember the old values, and insert the new ones
		for ( var name in options ) {
			old[ name ] = elem.style[ name ];
			elem.style[ name ] = options[ name ];
		}

		callback.call( elem );

		// Revert the old values
		for ( var name in options ) {
			elem.style[ name ] = old[ name ];
		}
	}
305001
function(value, sendUpdatedEvt) {
		
	   if(this.editorReady) {
			this.editor.setContent(value, {format : 'raw'});
      }
		else {
			this.editor.onInit.add(function(ed) {
				ed.setContent(value, {format : 'raw'});
			});
		}
	   
   	if(sendUpdatedEvt !== false) {
   	   // fire update event
         this.fireUpdatedEvt();
      }
	}
873839
def update(self, ng_template_id, name=NotUpdated, plugin_name=NotUpdated,
               plugin_version=NotUpdated, flavor_id=NotUpdated,
               description=NotUpdated, volumes_per_node=NotUpdated,
               volumes_size=NotUpdated, node_processes=NotUpdated,
               node_configs=NotUpdated, floating_ip_pool=NotUpdated,
               security_groups=NotUpdated, auto_security_group=NotUpdated,
               availability_zone=NotUpdated,
               volumes_availability_zone=NotUpdated, volume_type=NotUpdated,
               image_id=NotUpdated, is_proxy_gateway=NotUpdated,
               volume_local_to_instance=NotUpdated, use_autoconfig=NotUpdated,
               shares=NotUpdated, is_public=NotUpdated,
               is_protected=NotUpdated, volume_mount_prefix=NotUpdated,
               boot_from_volume=NotUpdated,
               boot_volume_type=NotUpdated,
               boot_volume_availability_zone=NotUpdated,
               boot_volume_local_to_instance=NotUpdated):
        """"""

        data = {}
        self._copy_if_updated(
            data, name=name, plugin_name=plugin_name,
            plugin_version=plugin_version, flavor_id=flavor_id,
            description=description, volumes_per_node=volumes_per_node,
            volumes_size=volumes_size, node_processes=node_processes,
            node_configs=node_configs, floating_ip_pool=floating_ip_pool,
            security_groups=security_groups,
            auto_security_group=auto_security_group,
            availability_zone=availability_zone,
            volumes_availability_zone=volumes_availability_zone,
            volume_type=volume_type, image_id=image_id,
            is_proxy_gateway=is_proxy_gateway,
            volume_local_to_instance=volume_local_to_instance,
            use_autoconfig=use_autoconfig, shares=shares,
            is_public=is_public, is_protected=is_protected,
            volume_mount_prefix=volume_mount_prefix,
            boot_from_volume=boot_from_volume,
            boot_volume_type=boot_volume_type,
            boot_volume_availability_zone=boot_volume_availability_zone,
            boot_volume_local_to_instance=boot_volume_local_to_instance
        )

        return self._patch('/node-group-templates/%s' % ng_template_id, data,
                           'node_group_template')
1280876
function bind()
        {
          bind.injectPrototypes(Node,'Node');
          bind.injectPrototypes(Element,'Element');
          bind.injectPrototypes(HTMLElement,'HTMLElement');
          bind.injectPrototypes(HTMLInputElement,'HTMLInputElement');
          bind.injectPrototypes(HTMLTextAreaElement,'HTMLTextAreaElement');
          bind.injectPrototypes(Document,'Document');

          var __set = _set,
              __update = _update;

          function hasInput(attrListeners)
          {
            var attrs = ['value','checked'],
                _localListeners = attrListeners,
                _localAttr = _localListeners._attrListeners,
                _localUpdateAttr = _localListeners._attrUpdateListeners,
                _localParentAttr = _localListeners._parentAttrListeners,
                _localParentUpdateAttr = _localListeners._parentAttrUpdateListeners,
                has = false;

            if(_attrListeners[_all] !== undefined || _attrUpdateListeners[_all] !== undefined)
            {
              has = true;
            }
            if(has !== true && _localAttr[_all] !== undefined ||
               _localUpdateAttr[_all] !== undefined ||
               _localParentAttr[_all] !== undefined ||
               _localParentUpdateAttr[_all] !== undefined)
            {
              has = true;
            }
            if(has !== true)
            {
              for(var x=0;x<attrs.length;x++)
              {
                if(_attrListeners[attrs[x]] !== undefined ||
                   _attrUpdateListeners[attrs[x]] !== undefined ||
                   _localAttr[attrs[x]] !== undefined ||
                   _localUpdateAttr[attrs[x]] !== undefined ||
                   _localParentAttr[attrs[x]] !== undefined ||
                   _localParentUpdateAttr[attrs[x]] !== undefined)
                  {
                    has = true;
                    break;
                  }
              }
            }
            return has;
          }

          function getStyles(arr,styles)
          {
            var x,
                _arr = arr,
                _styles = styles,
                len = styles.length;
            for(x=0;x<len;x++)
            {
              if(_arr.indexOf(_styles[x]) === -1)
              {
                _arr.push(_styles[x]);
              }
            }
            return _arr;
          }

          function hasStyle(attrListeners)
          {
            var _globalStyle = Object.keys(_styleListeners),
                _globalStyleUpdate = Object.keys(_styleUpdateListeners),
                _localListeners = attrListeners,
                _localStyle = Object.keys(_localListeners._styleListeners),
                _localUpdateStyle = Object.keys(_localListeners._styleUpdateListeners),
                _localParentStyle = Object.keys(_localListeners._parentStyleListeners),
                _localParentUpdateStyle = Object.keys(_localListeners._parentStyleUpdateListeners),
                has = [];

            if(_globalStyle.length !== 0 ||
               _globalStyleUpdate.length !== 0)
            {
              has = getStyles(has,_globalStyle);
              has = getStyles(has,_globalStyleUpdate);
            }
            if(has.length !== 0 && _localParentStyle.length !== 0 ||
               _localParentUpdateStyle.length !== 0)
            {
              has = getStyles(has,_localParentStyle);
              has = getStyles(has,_localParentUpdateStyle);
            }
            if(has.indexOf(_all) !== -1) has = _allStyles;
            return has;
          }

          function copyListeners(listeners,copyTo)
          {
            var listenerProps = Object.keys(listeners),
                _currProp,
                _currListener;
            for(var x=0,len=listenerProps.length;x<len;x++)
            {
              _currProp = listenerProps[x];
              if(copyTo[_currProp] === undefined)
              {
                copyTo[_currProp] = listeners[_currProp].slice();
              }
              else
              {
                for(var i=0,lenI=listeners[_currProp].length;i<lenI;i++)
                {
                  _currListener = listeners[_currProp][i];
                  copyTo[_currProp].push(_currListener);
                }
              }
            }
          }

          function reSync(e)
          {
            if(e.target.nodeType !== 3 && e.target.nodeType !== 8)
            {
              var attrListeners = e.target.attrListeners(),
                  _hasInput = hasInput(attrListeners),
                  _hasStyle = hasStyle(attrListeners),
                  _hasStyleLen = _hasStyle.length,
                  _parentAttr,
                  _parentAttrUpdate,
                  _parentStyle,
                  _parentStyleUpdate,
                  _listeners,
                  nodes = [],
                  len,
                  outer = ((e.attr === 'outerHTML' || e.attr === 'outerText') ? e.attr : undefined),
                  target = e.target

              if(outer !== undefined)
              {
                e.attr = 'appendChild',
                e.arguments = [e.target];
                e.target = e.target.parentElement;
              }

              if(_hasInput)
              {
                if(e.attr === 'appendChild' && e.arguments[0].nodeType !== 3 && e.arguments[0].nodeType !== 8)
                {
                  nodes = Array.prototype.slice.call(e.arguments[0].querySelectorAll('input,textarea'));
                  if(e.arguments[0].tagName === 'INPUT' || e.arguments[0].tagName === 'TEXTAREA')
                  {
                    nodes.unshift(e.arguments[0])
                  }
                }
                else
                {
                  nodes = Array.prototype.slice.call(e.target.querySelectorAll('input,textarea'));
                }
                len = nodes.length;
                for(var x=0;x<len;x++)
                {
                  if(nodes[x].addInputBinding !== undefined) nodes[x].addInputBinding();
                  if(nodes[x].addInputBoxBinding !== undefined) nodes[x].addInputBoxBinding();
                }
              }

              if(e.attr === 'appendChild' && e.arguments[0].nodeName !== '#text' && e.arguments[0].nodeName !== '#comment')
              {
                nodes = Array.prototype.slice.call(e.arguments[0].querySelectorAll('*'));
                nodes.unshift(e.arguments[0]);
                _parentAttr = e.target.__kb._parentAttrListeners;
                _parentAttrUpdate = e.target.__kb._parentAttrUpdateListeners;
                _parentStyle = e.target.__kb._parentStyleListeners;
                _parentStyleUpdate = e.target.__kb._parentStyleUpdateListeners;
              }
              else
              {
                nodes = Array.prototype.slice.call(e.target.querySelectorAll('*'));
                _parentAttr = e.target.__kb._parentAttrListeners;
                _parentAttrUpdate = e.target.__kb._parentAttrUpdateListeners;
                _parentStyle = e.target.__kb._parentStyleListeners;
                _parentStyleUpdate = e.target.__kb._parentStyleUpdateListeners;
              }
              len = nodes.length;

                for(var x=0;x<len;x++)
                {
                  if(_hasStyleLen !== 0)
                  {
                    for(var i=0;i<_hasStyleLen;i++)
                    {
                      bind.injectStyleProperty(nodes[x],_hasStyle[i]);
                    }
                  }
                  _listeners = nodes[x].attrListeners();

                  copyListeners(_parentAttr,_listeners._parentAttrListeners);
                  copyListeners(_parentAttrUpdate,_listeners._parentAttrUpdateListeners);
                  copyListeners(_parentStyle,_listeners._parentStyleListeners);
                  copyListeners(_parentStyleUpdate,_listeners._parentStyleUpdateListeners);
                }

              if(outer !== undefined)
              {
                e.attr = outer;
                e.target = target;
                e.arguments = [];
              }
            }
          }

          function checkAttr(e)
          {
            var oldAttr = e.target.attributes[e.arguments[0]],
                old = (oldAttr !== undefined ? oldAttr.value : ""),
                val = (e.attr === 'setAttribute' ? e.arguments[1] : "");
              if(!__set(e.target,e.arguments[0],val,old,[val])){
                e.preventDefault();
              }
          }

          function checkAttrUpdate(e)
          {
            var oldAttr = e.target.attributes[e.arguments[0]],
                old = (oldAttr !== undefined ? oldAttr.value : ""),
                val = (e.attr === 'setAttribute' ? e.arguments[1] : "");
                __update(e.target,e.arguments[0],val,old,[val]);
          }

          //for keeping binds with inputs
          bind.addAttrUpdateListener('appendChild',reSync);
          bind.addAttrUpdateListener('removeChild',reSync);
          bind.addAttrUpdateListener('innerHTML',reSync);
          bind.addAttrUpdateListener('outerHTML',reSync);
          bind.addAttrUpdateListener('innerText',reSync);
          bind.addAttrUpdateListener('outerText',reSync);
          bind.addAttrUpdateListener('textContent',reSync);

          //allows for html attribute changes to be listened to just like properties
          bind.addAttrListener('setAttribute',checkAttr);
          bind.addAttrListener('removeAttribute',checkAttr);

          bind.addAttrUpdateListener('setAttribute',checkAttrUpdate);
          bind.addAttrUpdateListener('removeAttribute',checkAttrUpdate);

          return bind;
        }
208574
function updateCurrentInput(input) {
    if (input !== currentInput) {
      body.classList.remove(`current-input-${currentInput}`);
      body.classList.add(`current-input-${input}`);
      currentInput = input;
    }
  }
1357214
function setNamed(dom, parent, keys) {
  // get the key value we want to add to the tag instance
  var key = getNamedKey(dom),
    isArr,
    // add the node detected to a tag instance using the named property
    add = function(value) {
      // avoid to override the tag properties already set
      if (contains(keys, key)) return
      // check whether this value is an array
      isArr = isArray(value)
      // if the key was never set
      if (!value)
        // set it once on the tag instance
        parent[key] = dom
      // if it was an array and not yet set
      else if (!isArr || isArr && !contains(value, dom)) {
        // add the dom node into the array
        if (isArr)
          value.push(dom)
        else
          parent[key] = [value, dom]
      }
    }

  // skip the elements with no named properties
  if (!key) return

  // check whether this key has been already evaluated
  if (tmpl.hasExpr(key))
    // wait the first updated event only once
    parent.one('mount', function() {
      key = getNamedKey(dom)
      add(parent[key])
    })
  else
    add(parent[key])

}
1216518
function update( element, value ) {
    var $el = $( element );
    var modelValue = unwrap( value() );
    var editorInstance = $el.data( 'froala.editor' );

    if( editorInstance == null ) {
      return;
    }

    var editorValue = editorInstance.html.get();

    // avoid any un-necessary updates
    if( editorValue !== modelValue && (typeof modelValue === 'string'  || modelValue === null)) {
      editorInstance.html.set( modelValue );
    }
  }
1248417
def patch(attrs, updates):
    """"""
    orig = {}
    for attr, value in updates:
        orig[attr] = attrs[attr]
        attrs[attr] = value
    return orig
1066281
function _onRemoteEdit(event, res) {
        // res = {nodeId, name, value}

        // detach from DOM change events
        if (res.value === "0") {
            Inspector.DOM.off(".EditAgent");
            return;
        }

        // find and store the edited node
        var node = DOMAgent.nodeWithId(res.nodeId);
        node = node.children[0];
        if (!node.location) {
            return;
        }
        _editedNode = node;

        // attach to character data modified events
        Inspector.DOM.on("characterDataModified.EditAgent", _onCharacterDataModified);
    }
825593
function (value, sendUpdatedEvt) {
		
			var i, length, choice, firstIndexAvailable, choiceFound = false;
		
			for (i = 0, length = this.choicesList.length; i < length ; i += 1) {
			
				if (this.choicesList[i].visible) {
				
					choice = this.choicesList[i];
				
					if (value === choice.value) {
					
						choice.node.selected = "selected";
						choiceFound = true;
						break; // choice node already found
					
					} else if (lang.isUndefined(firstIndexAvailable)) {
					
						firstIndexAvailable = i;
					}
				
				}
			
			}
			
			// select value from first choice available when
			// value not matching any visible choice
			//
			// if no choice available (-> firstIndexAvailable is undefined), skip value setting
			if (!choiceFound && !lang.isUndefined(firstIndexAvailable)) {
				
				choice = this.choicesList[firstIndexAvailable];
				choice.node.selected = "selected";
				value = choice.value;
				
			}
			
			// Call Field.setValue to set class and fire updated event
			inputEx.SelectField.superclass.setValue.call(this, value, sendUpdatedEvt);
		}
947298
function() {

      var x, arr, el, configs, model, value, attr, parts, style;

      // setup config events
      arr = document.querySelectorAll('.hashedit-config, .hashedit-modal');

      for (x = 0; x < arr.length; x += 1) {

        // delegate on .hashedit-config
        ['propertychange', 'change', 'click', 'keyup', 'input', 'paste'].forEach
          (function(e) {

            arr[x].addEventListener(e, function(e) {

              el = e.target;

              if (el.hasAttribute('hashedit-cancel-modal')) {

                // hide .hashedit-config, .hashedit-modal
                configs = document.querySelectorAll(
                  '.hashedit-modal');

                for (x = 0; x < configs.length; x += 1) {
                  configs[x].removeAttribute('visible');
                }

              }

              // look for [data-model]
              if (el.hasAttribute('data-model')) {

                model = el.getAttribute('data-model');
                value = '';
                attr = '';

                value = el.value;

                if (model.indexOf('node.') != -1) {
                  parts = model.split('.');

                  // converts camelcase to hyphens, sets attribute
                  if (parts.length > 1) {

                    // get property
                    attr = parts[1].replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();

                    if(attr === 'html') {
                      hashedit.current.node.innerHTML = value;

                      hashedit.setupElementMenu(hashedit.current.node);
                    }
                    else { // other elements

                      // get currentValue
                      var old = hashedit.current.node.getAttribute(attr);

                      // set attribute
                      hashedit.current.node.setAttribute(attr, value);

                      if(hashedit.debug === true) {
                        console.log('setattribute on [data-model]');
                        console.log('attr=' + attr + 'value=' + value);
                      }

                      // create text style
                      style = hashedit.createTextStyle(hashedit.current.node);

                      hashedit.current.node.setAttribute('style', style);

                      // call change event
                      for (x = 0; x < hashedit.menu.length; x += 1) {

                        if(hashedit.current.node.matches(hashedit.menu[x].selector)) {
                          if(hashedit.menu[x].change) {
                            hashedit.menu[x].change(attr, value, old);
                          }

                        }

                      }

                    }


                  }
                }

                if (model.indexOf('link.') != -1) {
                  parts = model.split('.');

                  // converts camelcase to hyphens, sets attribute
                  if (parts.length > 1) {

                    // get property
                    attr = parts[1].replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();

                    // set attribute
                    hashedit.currLink.setAttribute(attr, value);

                    // get current node
                    if(hashedit.current.node == null){
                      hashedit.current.node = hashedit.findParentBySelector(hashedit.currLink, '[hashedit-element]');
                    }

                    // fire event
                    hashedit.current.node.dispatchEvent(new Event(
                      'input', {
                        'bubbles': true
                      }));

                  }
                }

                if (model.indexOf('image.') != -1) {
                  parts = model.split('.');

                  // converts camelcase to hyphens, sets attribute
                  if (parts.length > 1) {

                    // get property
                    attr = parts[1].replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();

                    // set attribute
                    hashedit.current.image.setAttribute(attr, value);

                    hashedit.current.node = hashedit.findParentBySelector(hashedit.current.image, '[hashedit-element]');

                    // fire event
                    if (hashedit.current.node !== null) {

                      hashedit.current.node.dispatchEvent(new Event(
                        'input', {
                          'bubbles': true
                        }));
                    }

                  }
                }

              }

            }, false);

          });

      }

    }
1127111
function _onAttributeModified(event, res) {
        // res = {nodeId, name, value}
        var matches = /^data-ld-(.*)/.exec(res.name);
        if (matches) {
            exports.trigger(matches[1], res);
        }
    }
1003358
function () {
    each(dom, function (i, n) {
        var vo = n.two
        var key = n.one;
        _updateDom(key, vo)
    });
}
645774
function appendTd(tr, content, classNames) {
  let td = document.createElement('td');
  updateNode(td, content);
  tr.appendChild(td);
  if(classNames) {
    td.setAttribute('class', classNames);
  }
}
220151
def _update_property(tree_to_update, xpath_root, xpaths, values):
    

    # Inner function to update a specific XPATH with the values provided

    def update_element(elem, idx, root, path, vals):
        """ Internal helper function to encapsulate single item update """

        has_root = bool(root and len(path) > len(root) and path.startswith(root))
        path, attr = get_xpath_tuple(path)  # 'path/@attr' to ('path', 'attr')

        if attr:
            removed = [get_element(elem, path)]
            remove_element_attributes(removed[0], attr)
        elif not has_root:
            removed = wrap_value(remove_element(elem, path))
        else:
            path = get_xpath_branch(root, path)
            removed = [] if idx != 0 else [remove_element(e, path, True) for e in get_elements(elem, root)]

        if not vals:
            return removed

        items = []

        for i, val in enumerate(wrap_value(vals)):
            elem_to_update = elem

            if has_root:
                elem_to_update = insert_element(elem, (i + idx), root)

            val = val.decode('utf-8') if not isinstance(val, string_types) else val
            if not attr:
                items.append(insert_element(elem_to_update, i, path, val))
            elif path:
                items.append(insert_element(elem_to_update, i, path, **{attr: val}))
            else:
                set_element_attributes(elem_to_update, **{attr: val})
                items.append(elem_to_update)

        return items

    # Code to update each of the XPATHs with each of the values

    xpaths = reduce_value(xpaths)
    values = filter_empty(values)

    if isinstance(xpaths, string_types):
        return update_element(tree_to_update, 0, xpath_root, xpaths, values)
    else:
        each = []

        for index, xpath in enumerate(xpaths):
            value = values[index] if values else None
            each.extend(update_element(tree_to_update, index, xpath_root, xpath, value))

        return each
247424
private void doUpdateDevelopMode() throws PageException {

	admin.updateMode(getBoolObject("admin", action, "mode"));
	store();
	adminSync.broadcast(attributes, config);
    }