DOM events changes introduced in Firefox 66

Firefox, Firefox for... Firefox, Firefox for Enterprise Last updated: 07/09/2019 50% of users voted this helpful
ჯერჯერობით, ამ სტატიის გადათარგმნაში არავინ დაგვხმარებია. თუ თქვენ უკვე იცით, როგორ იმუშაოთ SUMO საიტზე, შეგიძლიათ ახლავე დაიწყოთ თარგმნა. თუ გსურთ გაიგოთ, როგორ ხდება სტატიების თარგმნა SUMO-სთვის, გთხოვთ, გაეცნოთ აქ.

Firefox 66 introduced the following DOM events changes for compatibility with legacy content:

  • The Window.event and Event.returnValue properties — originally proprietary Internet Explorer features, then also supported across other browsers for compatibility purposes — have been added in Firefox 66.
  • From Firefox 66 onwards, the KeyboardEvent.keyCode property of the keypress event object will be the same as KeyboardEvent.charCode. This mirroring behavior matches other browsers and is expected to solve most associated compatibility issues; however, user-agent sniffing might cause further issues in some JavaScript libraries.

If you maintain legacy intranet or hosted software that depends on Firefox not supporting these, the following two preferences exist as of Firefox version 68, to opt into the pre-Firefox 66 behavior:

  • dom.keyboardevent.keypress.hack.dispatch_non_printable_keys.addl
  • dom.keyboardevent.keypress.hack.use_legacy_keycode_and_charcode.addl

These preferences take a comma-delimited list of domains as a value; for example, internal.example.com or staging.example.com.

These preferences can be set via the new Preferences enterprise policy.

In Firefox version 66 and above, support for window.event can be disabled by setting dom.window.event.enabled to false.

დაგეხმარათ ეს სტატია?

გთხოვთ დაიცადოთ...

შესანიშნავი მოხალისეები, რომლებიც ამ სტატიის დაწერაში დაგვეხმარნენ:

Illustration of hands

მონაწილეობა

მიიღეთ და გაუზიარეთ გამოცდილება სხვებს. უპასუხეთ კითხვებს და გაამდიდრეთ ჩვენი ცოდნის წყარო.

ვრცლად