Bug 71843

Summary: [MutationObservers] Log some warning or error to the console if WebKitMutationObserver.observe is called with unknown dictionary keys
Product: WebKit Reporter: Rafael Weinstein <rafaelw>
Component: DOMAssignee: Adam Klein <adamk>
Status: RESOLVED WONTFIX    
Severity: Normal CC: adamk, arv, darin, ojan, rniwa, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 68729    
Attachments:
Description Flags
Patch
none
Patch none

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).