/* * Copyright (C)2005-2017 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ // This file is generated from mozilla\CSSPrimitiveValue.webidl. Do not edit! package js.html; /** The `CSSPrimitiveValue` interface derives from the `CSSValue` interface and represents the current computed value of a CSS property. Documentation [CSSPrimitiveValue](https://developer.mozilla.org/en-US/docs/Web/API/CSSPrimitiveValue) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/CSSPrimitiveValue$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("CSSPrimitiveValue") extern class CSSPrimitiveValue extends CSSValue { static inline var CSS_UNKNOWN : Int = 0; static inline var CSS_NUMBER : Int = 1; static inline var CSS_PERCENTAGE : Int = 2; static inline var CSS_EMS : Int = 3; static inline var CSS_EXS : Int = 4; static inline var CSS_PX : Int = 5; static inline var CSS_CM : Int = 6; static inline var CSS_MM : Int = 7; static inline var CSS_IN : Int = 8; static inline var CSS_PT : Int = 9; static inline var CSS_PC : Int = 10; static inline var CSS_DEG : Int = 11; static inline var CSS_RAD : Int = 12; static inline var CSS_GRAD : Int = 13; static inline var CSS_MS : Int = 14; static inline var CSS_S : Int = 15; static inline var CSS_HZ : Int = 16; static inline var CSS_KHZ : Int = 17; static inline var CSS_DIMENSION : Int = 18; static inline var CSS_STRING : Int = 19; static inline var CSS_URI : Int = 20; static inline var CSS_IDENT : Int = 21; static inline var CSS_ATTR : Int = 22; static inline var CSS_COUNTER : Int = 23; static inline var CSS_RECT : Int = 24; static inline var CSS_RGBCOLOR : Int = 25; /** An unsigned short representing the type of the value. Possible values are:
Constant Description
CSS_ATTR The value is an attr() function. The value can be obtained by using the getStringValue() method.
CSS_CM The value is a length in centimeters. The value can be obtained by using the getFloatValue() method.
CSS_COUNTER The value is a counter or counters function. The value can be obtained by using the getCounterValue() method.
CSS_DEG The value is an angle in degrees. The value can be obtained by using the getFloatValue() method.
CSS_DIMENSION The value is a number with an unknown dimension. The value can be obtained by using the getFloatValue() method.
CSS_EMS The value is a length in em units. The value can be obtained by using the getFloatValue() method.
CSS_EXS The value is a length in ex units. The value can be obtained by using the getFloatValue() method.
CSS_GRAD The value is an angle in grads. The value can be obtained by using the getFloatValue() method.
CSS_HZ The value is a frequency in Hertz. The value can be obtained by using the getFloatValue method.
CSS_IDENT The value is an identifier. The value can be obtained by using the getStringValue() method.
CSS_IN The value is a length in inches. The value can be obtained by using the getFloatValue() method.
CSS_KHZ The value is a frequency in Kilohertz. The value can be obtained by using the getFloatValue() method.
CSS_MM The value is a length in millimeters. The value can be obtained by using the getFloatValue() method.
CSS_MS The value is a time in milliseconds. The value can be obtained by using the getFloatValue() method.
CSS_NUMBER The value is a simple number. The value can be obtained by using the getFloatValue() method.
CSS_PC The value is a length in picas. The value can be obtained by using the getFloatValue() method.
CSS_PERCENTAGE The value is a percentage. The value can be obtained by using the getFloatValue() method.
CSS_PT The value is a length in points. The value can be obtained by using the getFloatValue() method.
CSS_PX The value is a length in pixels. The value can be obtained by using the getFloatValue() method.
CSS_RAD The value is an angle in radians. The value can be obtained by using the getFloatValue() method.
CSS_RECT The value is a shape function. The value can be obtained by using the getRectValue() method.
CSS_RGBCOLOR The value is an color. The value can be obtained by using the getRGBColorValue() method.
CSS_S The value is a time in seconds. The value can be obtained by using the getFloatValue() method.
CSS_STRING The value is a string. The value can be obtained by using the getStringValue() method.
CSS_UNKNOWN The value is not a recognized CSS2 value. The value can only be obtained by using the CSSValue.cssText attribute.
CSS_URI The value is a uri. The value can be obtained by using the getStringValue() method.
**/ var primitiveType(default,null) : Int; /** @throws DOMError */ /** A method to set the float value with a specified unit. If the property attached with this value can not accept the specified unit or the float value, the value will be unchanged and a `DOMException` will be raised. **/ function setFloatValue( unitType : Int, floatValue : Float ) : Void; /** @throws DOMError */ /** This method is used to get a float value in a specified unit. If this CSS value doesn't contain a float value or can't be converted into the specified unit, a `DOMException` is raised. **/ function getFloatValue( unitType : Int ) : Float; /** @throws DOMError */ /** A method to set the string value with the specified unit. If the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a `DOMException` will be raised. **/ function setStringValue( stringType : Int, stringValue : String ) : Void; /** @throws DOMError */ /** This method is used to get the string value. If the CSS value doesn't contain a string value, a `DOMException` is raised. **/ function getStringValue() : String; /** @throws DOMError */ /** This method is used to get the counter value. If this CSS value doesn't contain a counter value, a `DOMException` is raised. Modification to the corresponding style property can be achieved using the `Counter` interface. **/ function getCounterValue() : Dynamic/*MISSING Counter*/; /** @throws DOMError */ /** This method is used to get the Rect value. If this CSS value doesn't contain a rect value, a `DOMException` is raised. Modification to the corresponding style property can be achieved using the `Rect` interface. **/ function getRectValue() : Rect; /** @throws DOMError */ /** This method is used to get the RGB color. If this CSS value doesn't contain a RGB color value, a `DOMException` is raised. Modification to the corresponding style property can be achieved using the `RGBColor` interface. **/ function getRGBColorValue() : RGBColor; }