Loading ...
Sorry, an error occurred while loading the content.

1471Re: [json] Re: IE8 Native JSON Bug

Expand Messages
  • Arthur Blake
    Feb 25 12:59 PM
    • 0 Attachment
      Just saw this come across my automatic updates:

      http://support.microsoft.com/kb/976662

      <http://support.microsoft.com/kb/976662>Perhaps Microsoft has fixed the
      problem??

      On Tue, Jun 2, 2009 at 3:24 PM, Stephen M. McKamey <stephen@...>wrote:

      >
      >
      > Allen Wirfs-Brock suggested another work-around to the IE8 native JSON
      > issue:
      >
      > Another work-around that is isolated to a single place is to use IE8's
      > "mutable DOM prototypes" support to patch HTMLInputElement.prototype.value
      > so that the bogus "" value is filtered out. For example:
      >
      > ...
      >
      > (function() {
      >
      > var builtInInputValue =
      > Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").get;
      >
      > Object.defineProperty(HTMLInputElement.prototype, "value",
      >
      > { get: function() {
      >
      > var possiblyBad = builtInInputValue.call(this);
      >
      > return possiblyBad === "" ? "" : possiblyBad;
      >
      > }
      >
      > });
      >
      > })();
      >
      > ...
      >
      > A patch like this could be conditionally executed as part of the
      > initialization code of a framework.
      >
      >
      >


      [Non-text portions of this message have been removed]
    • Show all 7 messages in this topic