HTML table class name setter.

@throws DOMException if the id_value contains any type of whitespace
764245
public function table(string $class_name, string $id_value = ''): self
    {
        if (preg_match(",\s,", $id_value)) {
            throw new DOMException("the id attribute's value must not contain whitespace (spaces, tabs etc.)");
        }
        $clone = clone $this;
        $clone->class_name = $class_name;
        $clone->id_value = $id_value;

        return $clone;
    }
1234472
public void setHTML (int row, int column, String text, int colSpan, String... styles)
    {
        setHTML(row, column, text);
        if (colSpan > 0) {
            getFlexCellFormatter().setColSpan(row, column, colSpan);
        }
        setStyleNames(row, column, styles);
    }
833161
function setDomAttrs(attrs, el) {
	for (let attr in attrs) {
		if (!attrs.hasOwnProperty(attr)) { continue; }
		switch (attr) {
			case 'className':
			case 'id':
				el[attr] = attrs[attr];
				break;
			default:
				el.setAttribute(attr, attrs[attr]);
				break;
		}
	}

	return el;
}
198160
def set_input_by_id(self, _id, value):
        

        xpath = './/*[@id="%s"]' % _id
        if self._lxml_form is None:
            self.choose_form_by_element(xpath)
        sel = XpathSelector(self.form)
        elem = sel.select(xpath).node()
        # pylint: disable=no-member
        return self.set_input(elem.get('name'), value)
728201
public void setProperty(
            final String propertyName,
            final String value,
            final String priority) throws DOMException {
        try {
            CSSValueImpl expr = null;
            if (!value.isEmpty()) {
                final CSSOMParser parser = new CSSOMParser();
                expr = parser.parsePropertyValue(value);
            }
            Property p = getPropertyDeclaration(propertyName);
            final boolean important = PRIORITY_IMPORTANT.equalsIgnoreCase(priority);
            if (p == null) {
                p = new Property(propertyName, expr, important);
                addProperty(p);
            }
            else {
                p.setValue(expr);
                p.setImportant(important);
            }
        }
        catch (final Exception e) {
            throw new DOMExceptionImpl(
                    DOMException.SYNTAX_ERR,
                    DOMExceptionImpl.SYNTAX_ERROR,
                    e.getMessage());
        }
    }
423093
def on_html_attr(name, value)
      if value[0] == :slim && value[1] == :attrvalue && !options[:merge_attrs][name]
        # We handle the attribute as a boolean attribute
        escape, code = value[2], value[3]
        case code
        when 'true'
          [:html, :attr, name, [:multi]]
        when 'false', 'nil'
          [:multi]
        else
          tmp = unique_name
          [:multi,
           [:code, "#{tmp} = #{code}"],
           [:if, tmp,
            [:if, "#{tmp} == true",
             [:html, :attr, name, [:multi]],
             [:html, :attr, name, [:escape, escape, [:dynamic, tmp]]]]]]
        end
      else
        # Attribute with merging
        @attr = name
        super
      end
    end
1050838
static protected function _set_table_cellpadding(\DOMElement $node, $value)
    {
        $cell_list = self::get_cell_list($node);

        foreach ($cell_list as $cell) {
            self::append_style($cell, "; padding: {$value}px;");
        }

        return null;
    }
1182601
public function set($html_string) {
		$libxml_use_internal_errors = libxml_use_internal_errors(true);
		// workaround to handle UTF-8
		$this->loadHtml('<?xml encoding="UTF-8">' . $html_string);
		libxml_use_internal_errors($libxml_use_internal_errors);
		$this->xpath = new \DOMXPath($this);
	}
1022204
protected function setNonEmptyAttribute(\DomElement $element, string $name, string $value = null) : void
    {
        if (! is_null($value)) {
            $element->setAttribute($name, $value);
        }
    }
102715
function (key, value, namespaceUri) {

                if (!_.isUndefined(value) && value !== null) {
                    namespaceUri = namespaceUri || this.$attributesNamespace[key];

                    if (this.$el.setAttributeNS && namespaceUri) {
                        this.$el.setAttributeNS(namespaceUri, key, value);
                    } else {
                        this.$el.setAttribute(key, value);
                    }
                } else {
                    // first set empty -> needed for Chrome
                    this.$el.setAttribute(key, "");
                    // then remove -> needed for firefox
                    this.$el.removeAttribute(key);
                }
            }
321797
public void setCssText(final String cssText) throws DOMException {
        try {
            final CSSOMParser parser = new CSSOMParser();
            final CSSValueImpl v2 = parser.parsePropertyValue(cssText);
            value_ = v2.value_;
        }
        catch (final Exception e) {
            throw new DOMExceptionImpl(
                DOMException.SYNTAX_ERR,
                DOMExceptionImpl.SYNTAX_ERROR,
                e.getMessage());
        }
    }
163844
public void setAttribute(String domainName, String beanName, String attrName, Object value) throws Exception {
		setAttribute(ObjectNameUtil.makeObjectName(domainName, beanName), attrName, value);
	}
668671
function (newValue) {
                var attribute, domElt = this.getDom(), whiteList = ariaTemplatesDomElementWrapper.attributesWhiteList, newAttributeValue;
                var oldValue = this.attributes;

                // remove old members
                for (attribute in oldValue) {
                    if (oldValue.hasOwnProperty(attribute)) {
                        if (attribute == "dataset") {
                            ariaUtilsHtml.removeDataset(domElt, oldValue[attribute]);
                        } else if (!newValue[attribute]) {
                            if (attribute == "classList") {
                                this.getWrapper().classList.setClassName("");
                            } else {
                                domElt.removeAttribute(attribute);
                            }
                        }
                    }
                }

                // add new members
                for (attribute in newValue) {
                    newAttributeValue = newValue[attribute];
                    if (newValue.hasOwnProperty(attribute) && !this.__json.isMetadata(attribute)
                            && newAttributeValue != null) {
                        if (attribute == "classList") {
                            this.getWrapper().classList.setClassName(newAttributeValue.join(" "));
                        } else if (attribute == "dataset") {
                            ariaUtilsHtml.setDataset(domElt, newAttributeValue);
                        } else if (whiteList.test(attribute) && newAttributeValue !== oldValue[attribute]) {
                            domElt.setAttribute(attribute, newAttributeValue);
                        }
                    }
                }

                this.attributes = this.__json.copy(newValue);
            }
1188151
function domElement(ids) {
        var selector = "";
        if (!Array.isArray(ids)) {
            ids = [ids];
        }
        _.each(ids, function (id) {
            if (selector !== "") {
                selector += ",";
            }
            selector += "[data-brackets-id='" + id + "']";
        });
        rule(selector);
    }
1110317
static protected function _set_table_border(\DOMElement $node, $value)
    {
        $cell_list = self::get_cell_list($node);

        foreach ($cell_list as $cell) {
            $style = rtrim($cell->getAttribute(self::$_style_attr));
            $style .= "; border-width: " . ($value > 0 ? 1 : 0) . "pt; border-style: inset;";
            $style = ltrim($style, ";");
            $cell->setAttribute(self::$_style_attr, $style);
        }

        $style = rtrim($node->getAttribute(self::$_style_attr), ";");
        $style .= "; border-width: $value" . "px; ";

        return ltrim($style, "; ");
    }
1252844
static protected function _set_table_rules(\DOMElement $node, $value)
    {
        $new_style = "; border-collapse: collapse;";

        switch ($value) {
            case "none":
                $new_style .= "border-style: none;";
                break;

            case "groups":
                // FIXME: unsupported
                return null;

            case "rows":
                $new_style .= "border-style: solid none solid none; border-width: 1px; ";
                break;

            case "cols":
                $new_style .= "border-style: none solid none solid; border-width: 1px; ";
                break;

            case "all":
                $new_style .= "border-style: solid; border-width: 1px; ";
                break;

            default:
                // Invalid value
                return null;
        }

        $cell_list = self::get_cell_list($node);

        foreach ($cell_list as $cell) {
            $style = $cell->getAttribute(self::$_style_attr);
            $style .= $new_style;
            $cell->setAttribute(self::$_style_attr, $style);
        }

        $style = rtrim($node->getAttribute(self::$_style_attr), ";");
        $style .= "; border-collapse: collapse; ";

        return ltrim($style, "; ");
    }
776817
public boolean setHiddenInputValue(String idOrName, String value) {
        T element = findElement(By.id(idOrName));
        if (element == null) {
            element = findElement(By.name(idOrName));
            if (element != null) {
                executeJavascript("document.getElementsByName('%s')[0].value='%s'", idOrName, value);
            }
        } else {
            executeJavascript("document.getElementById('%s').value='%s'", idOrName, value);
        }
        return element != null;
    }