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

Rafael Weinstein
Reported 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.
Attachments
Patch (4.67 KB, patch)
2011-12-09 12:29 PST, Adam Klein
no flags
Patch (4.87 KB, patch)
2011-12-09 14:12 PST, Adam Klein
no flags
Adam Klein
Comment 1 2011-12-09 12:29:01 PST
Adam Klein
Comment 2 2011-12-09 12:29:35 PST
No tests yet, and I'm not sure if I still should be using OptionsObject.
Adam Klein
Comment 3 2011-12-09 14:12:59 PST
Adam Klein
Comment 4 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).
Note You need to log in before you can comment on or make changes to this bug.