Attempting to load http://orange.fr (with an iOS user-agent) fails after r107883. Console shows: TypeError: 'true' is not a function (evaluating '$("page1").translate("100%","100%")')
The page does: if (wink.isUndefined(HTMLElement.prototype.translate)) HTMLElement.prototype.translate = HTMLElement.prototype.winkTranslate;
<rdar://problem/11122949>
Is wink a library of some sort, or is it specific to this site? If enough sites use this library, we'll probably need to change the spec to use a name other than "translate" for the translation feature.
(In reply to comment #3) > Is wink a library of some sort, or is it specific to this site? If enough sites use this library, we'll probably need to change the spec to use a name other than "translate" for the translation feature. Possibly <http://www.winktoolkit.org>?
Seems likely: http://www.winktoolkit.org/documentation/symbols/HTMLElement.html#translate
orange.fr is getting it via http://omldev.hopto.org:8080/snowdev/js/wink.min.js
I'll send an email to the WhatWG.
Sent. Let's see if folks there have thoughts on what we should do here.
I can take care of making any necessary changes if there's a need.
Adam's thread on the whatwg list: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-March/035173.html
Hi Adam, With this support our product is breaking now. Present we are loading and using the translate() API on HTML elements to translate. But now with this change it is breaking. Is there any way to override this attribute. We can change the API but, so many existing customers and our internal components are also using this. Please help with this.
Hi Rakesh, From <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-March/035199.html>, I was under the impression that the Wink Toolkit folks have resolved the issue on their end. Have you discussed the issue with Jérôme ? Generally, it's not a good idea to squat on property names on HTMLElements (like translate). As HTML evolves, it will use more and more of these names.
Hi Adam, Thank you very much for the quick reply. Am not discussed the issue with Jérôme. Am not able to comment in the above link. I saw a discussion in progress to change the name of the attribute. Is it going to be changed? Our code exist for last 4 to 5 years, now changing the API means a lot of effort. Need to communicate to all customers and change the internal components code. And is there any way(hack) to override this attribute? (In reply to comment #12) > Hi Rakesh, > > From <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-March/035199.html>, I was under the impression that the Wink Toolkit folks have resolved the issue on their end. Have you discussed the issue with Jérôme ? > > Generally, it's not a good idea to squat on property names on HTMLElements (like translate). As HTML evolves, it will use more and more of these names.
Oh, I think I misunderstood your earlier comment. Are you using the Wink Toolkit? It sounds like you're problem might be separate from the Wink issue. There is an ugly way to hack around the issue. You can delete the translate property from each element. For example: delete document.body.translate; alert(document.body.translate); ^^^ Now the translate property is gone. It's a bit tricky because the property is on each element rather than on the prototype chain. I'm not sure what constraints you face, but that might be one option to explore.
Yah my problem is separate from the Wink Toolkit. Thank you for the work around. I tested with sample page it is working fine. My assumption now is, "translate" attribute name is not going to be chagned? Thanks & Regards Rakesh (In reply to comment #14) > Oh, I think I misunderstood your earlier comment. Are you using the Wink Toolkit? It sounds like you're problem might be separate from the Wink issue. > > There is an ugly way to hack around the issue. You can delete the translate property from each element. For example: > > delete document.body.translate; > alert(document.body.translate); > ^^^ Now the translate property is gone. > > It's a bit tricky because the property is on each element rather than on the prototype chain. I'm not sure what constraints you face, but that might be one option to explore.
(In reply to comment #15) >My assumption now is, "translate" attribute name is not going to be chagned? As far as I know, we won't be changing the name of the content attribute. So you should eventually rename the function. In general, you should prefix your function names to avoid name conflicts like this.
hmmm... :-) Ok, we will change the name of the API. Thanks you for spending time and giving information. Regards, Raeksh (In reply to comment #16) > (In reply to comment #15) > >My assumption now is, "translate" attribute name is not going to be chagned? > > As far as I know, we won't be changing the name of the content attribute. So you should eventually rename the function. In general, you should prefix your function names to avoid name conflicts like this.
Loading orange.fr with an iPhone user agent seems to work now. I don't see that message in the console anymore.
Hi Adam, With the option "delete document.body.translate", am facing issue in Mac Safari6. With this operation not able to delete the "translate" attribute. Where as in chrome it is working fine. Do you have any idea? (In reply to comment #14) > Oh, I think I misunderstood your earlier comment. Are you using the Wink Toolkit? It sounds like you're problem might be separate from the Wink issue. > > There is an ugly way to hack around the issue. You can delete the translate property from each element. For example: > > delete document.body.translate; > alert(document.body.translate); > ^^^ Now the translate property is gone. > > It's a bit tricky because the property is on each element rather than on the prototype chain. I'm not sure what constraints you face, but that might be one option to explore.
This bug is resolved. If something broke again, please file a new bug. That said, renaming translate in your code to not conflict with HTML5 is the best way to resolve this.