mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
![]() Previously, the Object class had many different types of functions for each action. For example: get_by_index, get(PropertyName), get(FlyString). This is a bit verbose, so these methods have been shortened to simply use the PropertyName structure. The methods then internally call _by_index if necessary. Note that the _by_index have been made private to enforce this change. Secondly, a clear distinction has been made between "putting" and "defining" an object property. "Putting" should mean modifying a (potentially) already existing property. This is akin to doing "a.b = 'foo'". This implies two things about put operations: - They will search the prototype chain for setters and call them, if necessary. - If no property exists with a particular key, the put operation should create a new property with the default attributes (configurable, writable, and enumerable). In contrast, "defining" a property should completely overwrite any existing value without calling setters (if that property is configurable, of course). Thus, all of the many JS objects have had any "put" calls changed to "define_property" calls. Additionally, "put_native_function" and "put_native_property" have had their "put" replaced with "define". Finally, "put_own_property" has been made private, as all necessary functionality should be exposed with the put and define_property methods. |
||
---|---|---|
.. | ||
CanvasRenderingContext2DWrapper.cpp | ||
CanvasRenderingContext2DWrapper.h | ||
DocumentWrapper.cpp | ||
DocumentWrapper.h | ||
ElementWrapper.cpp | ||
ElementWrapper.h | ||
EventListenerWrapper.cpp | ||
EventListenerWrapper.h | ||
EventTargetWrapper.cpp | ||
EventTargetWrapper.h | ||
EventWrapper.cpp | ||
EventWrapper.h | ||
HTMLCanvasElementWrapper.cpp | ||
HTMLCanvasElementWrapper.h | ||
HTMLImageElementWrapper.cpp | ||
HTMLImageElementWrapper.h | ||
ImageDataWrapper.cpp | ||
ImageDataWrapper.h | ||
LocationObject.cpp | ||
LocationObject.h | ||
MouseEventWrapper.cpp | ||
MouseEventWrapper.h | ||
NavigatorObject.cpp | ||
NavigatorObject.h | ||
NodeWrapper.cpp | ||
NodeWrapper.h | ||
WindowObject.cpp | ||
WindowObject.h | ||
Wrappable.cpp | ||
Wrappable.h | ||
Wrapper.h | ||
XMLHttpRequestConstructor.cpp | ||
XMLHttpRequestConstructor.h | ||
XMLHttpRequestPrototype.cpp | ||
XMLHttpRequestPrototype.h | ||
XMLHttpRequestWrapper.cpp | ||
XMLHttpRequestWrapper.h |