Regarding the ie support: We have really a lot of large customers 
(https://resources.softwareag.com/customers) in all business sectors and 
also a lot of customers in the financial sector which are normally very 
slow updating software. Last year we removed the support for ie8, ie9 and 
ie10 for all our up coming web based product releases. But ie11 is still 
present in some companies ...
The customers mentioned on the page are really a very small set of all 
customer that we have. So I personally think that is absolute okay removing 
all ie<11 browsers from the GWT support list.


Am Donnerstag, 11. Juni 2020 20:08:48 UTC+2 schrieb stockiNail:
>
> Hi all,
>
> I was facing an annoying issue about the hashcode *$N* property, stored 
> inside the java script object.
>
> I'm using GWT 2.8.2 but no JSNI implementation, only JSInterop objects.
>
> I'm writing an object (JsType native) in order to configure a chart for 
> Chart.js. 
>
> @JsType(isNative = true, name = "Object", namespace = JsPackage.GLOBAL)
>
> Every property is the ID of another object.
>
> But unfortunately I got an error from Chart.js because it is scanning all 
> properties keys to get the objects but it does not recognize the value of 
> *$H*, being a number and not a object.
>
> scales: { 
>   $H: 135, 
>   x: {id: "x", _charbaId: 2, type: "category", axis: "x", display: true, …}, 
>   y: {id: "y", _charbaId: 3, type: "linear", axis: "y", display: true, …} 
> }
>
> It's clear that a hashcode must be stored therefore there is no way to remove 
> it.
>
> Searching for a solution, I have found the *javaemul.internal.ObjectHashing* 
> class which is managing the H$ property, I guess:
>
>  public static native int getHashCode(Object o) /*-{
>     return o.$H || (o.$H = @ObjectHashing::getNextHashId()());
>  }-*/;
>
> I think the definition of H$ property must be changed, in order to define the 
> property "not enumerable" (currently is writable, enumerable and 
> configurable) using *Object.defineProperty()*, as it is reported 
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty.
>
> The *Object.defineProperty()* method is not supported into Internet Explorer 
> 8 therefore if going to manage the hascode in this way, GWT will drop the 
> support on IE8 as well.
>
> In the J2CL implementation, it looks like already aligned with my proposal:
>
>
> /** 
>   * Utility functions for setting and retrieving system level hashcodes. 
>   */
> class Hashing { 
>    /** 
>      * Gets a hash code on the passed-in object. 
>      * 
>      * @param {*} obj 
>      * @return {number} 
>      * @public 
>      */ 
>      static $getHashCode(obj) { 
>         let o = /** @type {Object} */ (obj); 
>         return o.$systemHashCode || (Object.defineProperties(o, { 
> $systemHashCode: {value: Hashing.$getNextHashId(), enumerable: false} }), 
> o.$systemHashCode); 
>      }
>
> Anyway, as workaround, I'm rewriting the hashcode property for this object, 
> maintaining the same value but setting the property as not enumerale and it 
> seems working.
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/391b43c1-4863-4002-a292-4c6d3740832co%40googlegroups.com.

Reply via email to