main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
555 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import capitalizeString from './capitalizeString';
|
---|
| 2 |
|
---|
| 3 | export default function prefixProperty(prefixProperties, property, style) {
|
---|
| 4 | var requiredPrefixes = prefixProperties[property];
|
---|
| 5 |
|
---|
| 6 | if (requiredPrefixes && style.hasOwnProperty(property)) {
|
---|
| 7 | var capitalizedProperty = capitalizeString(property);
|
---|
| 8 |
|
---|
| 9 | for (var i = 0; i < requiredPrefixes.length; ++i) {
|
---|
| 10 | var prefixedProperty = requiredPrefixes[i] + capitalizedProperty;
|
---|
| 11 |
|
---|
| 12 | if (!style[prefixedProperty]) {
|
---|
| 13 | style[prefixedProperty] = style[property];
|
---|
| 14 | }
|
---|
| 15 | }
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | return style;
|
---|
| 19 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.