code: 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());
          }
      }
docs: Set a property.
  @param propertyName the name of the property
  @param value the new value
  @param priority the priority
  @throws DOMException in case of error