-
Notifications
You must be signed in to change notification settings - Fork 9
Usage of XmlElement over Element is inconvenient #11
Comments
Also worth noting:
|
Another (generated) inconsistency is |
- it looks that order of members has changed (it might need has fixed position)
I do agree with you that this is a problem that needs to be solved. As I wrote in #12, I'm starting to think that the Xml and Html parts should be split between different assemblies. AFAIK, once you're in an |
Please take a look at the latest build and see what you think. |
I will try to apply this new version to my project as soon as I find time. Thanks. |
From my point of view it is ok. |
I found an hour or so to spend trying to convert my project to the latest Saltarelle.Web from develop. I unfortunately didn't have time to complete the whole conversion--we have a lot of code--but I'll try to finish later. The improvements from the commits helped, but as you might imagine there's a number of other similar methods with issues. I don't know if you think it's maintainable to try to support them, but I'll list them.
It still seems like a fair amount of manual casting has to be done in some cases. I suppose it's easy enough to do a I took some more notes about things I had to convert to go to 3.x. It would be nice if we had the wiki section editable here so I could contribute them to a "Converting to 3.x" article or something. |
ad 6) I think it is similar to #14. |
|
Those changes should help a lot. I still find #1 in my list to be pretty inconvenient, though. Though, now that I notice |
I added the wiki page https:/erik-kallen/SaltarelleWeb/wiki/Incompatibilities-between-2.x-and-3.x Regarding 1, beware that the |
Not exactly a bug, but I'm finding the new usage of XmlElement as a return type for various API functions as rather inconvenient, resulting in a lot of manual casting. I understand that these are probably perfectly valid type constraints in terms of the spec, but they're very inconvenient to work with since there are more relevant casts will pass in most common usage.
Some examples:
Element.ParentNode
returnsXmlElement
instead of ElementDocument.CreateElement
returnsXmlElement
Document.DocumentElement
returnsXmlElement
This means a line like
Document.DocumentElement.AddEventListener("event", ...);
has to turn into
((Element)Document.DocumentElement).AddEventListener("event, ...);
or be separated into two lines, or make use of an extension method to do the cast (which can be more inconvenient given namespace issues).
I don't particularly have a proposed solution, I just feel like the more simplified typing was a lot easier to work with.
The text was updated successfully, but these errors were encountered: