@@ -427,17 +427,6 @@ IMPL_PROPERTY_SETTER(Element, className)(JSContext* ctx, JSValue this_val, int a
427427 return JS_DupValue (ctx, value);
428428}
429429
430- IMPL_PROPERTY_GETTER (Element, style)(JSContext* ctx, JSValue this_val, int argc, JSValue* argv) {
431- getDartMethod ()->flushUICommand ();
432- return getAttribute (ctx, this_val, argc, argv);
433- }
434-
435- IMPL_PROPERTY_SETTER (Element, style)(JSContext* ctx, JSValue this_val, int argc, JSValue* argv) {
436- JSValue value = argv[0 ];
437- JSValue args[] = {JS_NewString (ctx, " style" ), value};
438- return setAttribute (ctx, this_val, 2 , args);
439- }
440-
441430IMPL_PROPERTY_GETTER (Element, offsetLeft)(JSContext* ctx, JSValue this_val, int argc, JSValue* argv) {
442431 auto * element = static_cast <ElementInstance*>(JS_GetOpaque (this_val, Element::classId ()));
443432 return element->getBindingProperty (" offsetLeft" );
@@ -855,7 +844,7 @@ ElementInstance::ElementInstance(Element* element, std::string tagName, bool sho
855844 JSValue style = JS_CallConstructor (m_ctx, CSSStyleDeclaration::instance (m_context)->jsObject , 1 , arguments);
856845 m_style = static_cast <StyleDeclarationInstance*>(JS_GetOpaque (style, CSSStyleDeclaration::kCSSStyleDeclarationClassId ));
857846
858- JS_DefinePropertyValueStr (m_ctx, jsObject, " styleDeclaration " , m_style->jsObject , JS_PROP_C_W_E);
847+ JS_DefinePropertyValueStr (m_ctx, jsObject, " style " , m_style->jsObject , JS_PROP_C_W_E);
859848
860849 if (shouldAddUICommand) {
861850 std::unique_ptr<NativeString> args_01 = stringToNativeString (tagName);
@@ -865,7 +854,7 @@ ElementInstance::ElementInstance(Element* element, std::string tagName, bool sho
865854
866855JSClassExoticMethods ElementInstance::exoticMethods{nullptr , nullptr , nullptr , nullptr , hasProperty, getProperty, setProperty};
867856
868- StyleDeclarationInstance* ElementInstance::styleDeclaration () {
857+ StyleDeclarationInstance* ElementInstance::style () {
869858 return m_style;
870859}
871860
0 commit comments