Tap on a clip to paste it in the text box.Touch and hold a clip to pin it. 
Unpinned clips will be deleted after 1 hour.Welcome to Gboard clipboard, 
any text you copy will be saved here.Welcome to Gboard clipboard, any text 
you copy will be saved here.Touch and hold a clip to pin it. Unpinned clips 
will be deleted after 1 hour.

On Friday, May 8, 2020 at 11:15:01 AM UTC-5 advdk...@gmail.com wrote:

>
>
> Em segunda-feira, 14 de dezembro de 2015 11:36:12 UTC-2, Philip Jägenstedt 
> escreveu:
>
>> Primary eng (and PM) emails
>>
>> phi...@opera.com
>>
>>
>> Link to “Intent to Deprecate” thread
>> This was deprecated in July 2013 
>> <https://chromium.googlesource.com/chromium/src/+/72eaef01f74fd1b2f11590c1bfa776ba81462e82>,
>>  
>> before the current process.
>>
>>
>> Summary
>>
>> The location attribute allows disambiguating between keys that are on 
>> multiple places on a keyboard, like digits and Enter. See the spec 
>> <https://w3c.github.io/uievents/#interface-KeyboardEvent> for details. The 
>> keyLocation is a simple alias of location, which I would like to remove.
>>
>>
>> *Because this has been deprecated for a long time, people may no longer 
>> take the deprecation message seriously. I propose to update the deprecation 
>> message in M49 to include "*will be removed in M50, around April 2016" 
>> and to then remove in M50.
>>
>>
>> Motivation
>>
>> As the spec says "The KeyboardEvent interface was briefly (from 
>> 2003-2010) defined to have keyIdentifier and keyLocation attributes, but 
>> these were removed in favor of the current key and location attributes. 
>> These attributes were not widely implemented." (This stretches the 
>> definition of "brief" by quite a bit...)
>>
>>
>> Neither Edge nor Gecko support keyLocation, while both support location.
>>
>>
>> Also, web developers have to do extra work to avoid this deprecation 
>> message, see below.
>>
>>
>> Compatibility Risk
>>
>> I have analyzed all occurrences in the 20150101 httparchive data, 
>> finding hits in 3989 resources out of about 1 million. (One page can use 
>> many resources, but I haven't counted unique pages.)
>>
>>
>> I found not a single problematic case, but many interesting things:
>>
>>
>>    - video.js, with 2660 hits. It has a fixEvent method that enumerates 
>>    attributes, with code specifically to avoid deprecation messages 
>>    
>> <https://github.com/videojs/video.js/blob/8d9695b6adb352ace30fd95e25e61cbae6520e83/src/js/utils/events.js#L240>
>>    !
>>    - GumGum <https://g2.gumgum.com/javascripts/ggv2.js>, an ad platform 
>>    with 998 hits. From the minified code, it looks like it's just listing 
>>    attributes on various event types, for the purpose of eventually copying 
>>    events. Nothing specific is done with keyLocation.
>>    - TinyMCE, with 180 hits, which also blacklists attributes in order 
>>    to avoid deprecation messages 
>>    
>> <https://github.com/tinymce/tinymce/blob/ddfa0366fc700334f67b2c57f8c6e290abf0b222/js/tinymce/classes/dom/EventUtils.js#L26>
>>    .
>>    - A script usually called ace.js, with 44 hits, with the check `if 
>> (e.keyLocation 
>>    || e.location == 3)`. This looks like a typo, it should probably check if 
>>    either attribute is 3. Fortunately, it's only checked for keyCode 13 
>> which 
>>    is "Enter", where 0 and 3 are the only possible values in my testing.
>>
>> The categories get smaller, and the only other thing worthy of mention is 
>> that webcomponents.js also blacklists keyLocation 
>> <https://github.com/webcomponents/webcomponentsjs/blob/32f5cf867480d99288fa6af034ae6df3881fe98d/src/ShadowDOM/wrappers/events.js#L469>,
>>  
>> presumably because of the deprecation message.
>>
>>
>> It looks like the true risk is *far* smaller than the use counter would 
>> suggest.
>>
>>
>> (Going forward, we should be very careful about adding deprecation 
>> messages for attributes on event interfaces.)
>>
>>
>> Alternative implementation suggestion for web developers
>>
>> Use the location attribute.
>>
>>
>> Usage information from UseCounter 
>> <https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/page/UseCounter.h&sq=package:chromium&type=cs&q=file:UseCounter.h%20Feature&l=39>
>>
>> https://www.chromestatus.com/metrics/feature/timeline/popularity/91
>>
>>
>> OWP launch tracking bug
>>
>> https://crbug.com/568261
>>
>>
>> Entry on the feature dashboard <https://www.chromestatus.com/>
>>
>> https://www.chromestatus.com/features/4997403308457984
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/64a0b9c4-81b2-4fc9-80df-926e1cc17b35n%40chromium.org.

Reply via email to