Bug 71843 - [MutationObservers] Log some warning or error to the console if WebKitMutationObserver.observe is called with unknown dictionary keys
Summary: [MutationObservers] Log some warning or error to the console if WebKitMutatio...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Klein
URL:
Keywords:
Depends on:
Blocks: 68729
  Show dependency treegraph
 
Reported: 2011-11-08 11:46 PST by Rafael Weinstein
Modified: 2011-12-09 14:25 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.67 KB, patch)
2011-12-09 12:29 PST, Adam Klein
no flags Details | Formatted Diff | Diff
Patch (4.87 KB, patch)
2011-12-09 14:12 PST, Adam Klein
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Weinstein 2011-11-08 11:46:14 PST
I just spent an hour debugging and finally realized that my script was calling observer.observe(myNode, { childList: true, subtreee: true }) -- note "subtreee".

This style of DOM API (options bag) is somewhat new to DOM. From talking with Anne & Adam, we can make it a script error to use an unsupported dictionary key, but we can consider issuing a warning to the console.
Comment 1 Adam Klein 2011-12-09 12:29:01 PST
Created attachment 118611 [details]
Patch
Comment 2 Adam Klein 2011-12-09 12:29:35 PST
No tests yet, and I'm not sure if I still should be using OptionsObject.
Comment 3 Adam Klein 2011-12-09 14:12:59 PST
Created attachment 118634 [details]
Patch
Comment 4 Adam Klein 2011-12-09 14:25:27 PST
After discussion with Ojan & Arv, we've agreed that we probably don't want to do this, since it's not an error to pass unknown options (e.g., future additions to the spec).