MCPcopy
hub / github.com/MrNothing/AI-Blocks / getElementStyles

Function getElementStyles

Sources/src/libs/jquery-ui.js:2037–2063  ·  view source on GitHub ↗
( elem )

Source from the content-addressed store, hash-verified

2035);
2036
2037function getElementStyles( elem ) {
2038 var key, len,
2039 style = elem.ownerDocument.defaultView ?
2040 elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
2041 elem.currentStyle,
2042 styles = {};
2043
2044 if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
2045 len = style.length;
2046 while ( len-- ) {
2047 key = style[ len ];
2048 if ( typeof style[ key ] === "string" ) {
2049 styles[ $.camelCase( key ) ] = style[ key ];
2050 }
2051 }
2052
2053 // Support: Opera, IE <9
2054 } else {
2055 for ( key in style ) {
2056 if ( typeof style[ key ] === "string" ) {
2057 styles[ key ] = style[ key ];
2058 }
2059 }
2060 }
2061
2062 return styles;
2063}
2064
2065function styleDifference( oldStyle, newStyle ) {
2066 var diff = {},

Callers 1

jquery-ui.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected