public class IAttributes extends Objs
Objs.Constructor<T extends Objs>, Objs.Property<T>
Modifier and Type | Field and Description |
---|---|
Objs.Property<Objs> |
$attr
A map of DOM element attribute names to the normalized name.
|
Modifier | Constructor and Description |
---|---|
protected |
IAttributes(Objs.Constructor<?> c,
Object js) |
Modifier and Type | Method and Description |
---|---|
void |
$addClass(String classVal)
Adds the CSS class value specified by the classVal parameter to the
element.
|
static IAttributes |
$as(Object obj) |
Objs |
$attr() |
Object |
$get(String name)
this is necessary to be able to access the scoped attributes. it's not very elegant
because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
|
String |
$normalize(String name)
Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
|
<T> Function |
$observe(String name,
Function.A1<? super T,? extends Object> fn)
Set DOM element attribute value.
|
void |
$removeClass(String classVal)
Removes the CSS class value specified by the classVal parameter from the
element.
|
void |
$updateClass(String newClasses,
String oldClasses)
Adds and removes the appropriate CSS class values to the element based on the difference between
the new and old CSS class values (specified as newClasses and oldClasses).
|
$as, $cast, $delete, $js, $set, create, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, newObject, newObject, preventExtensions, propertyIsEnumerable, seal, toLocaleString, toString, valueOf
public Objs.Property<Objs> $attr
protected IAttributes(Objs.Constructor<?> c, Object js)
public static IAttributes $as(Object obj)
public Object $get(String name)
public Objs $attr()
public void $addClass(String classVal)
public String $normalize(String name)
public <T> Function $observe(String name, Function.A1<? super T,? extends Object> fn)
public void $removeClass(String classVal)
Copyright © 2018. All rights reserved.