https://bugzilla.wikimedia.org/show_bug.cgi?id=31417
--- Comment #9 from Yair Rand <[email protected]> 2011-10-06 23:06:58 UTC --- (In reply to comment #8) > Additional arguments on live? Are you trying to make use of arguments defined > as internal-only instead of properly using the .delegate interface provided to > you? Hm, I didn't know that those are internal-only. Fixed. > DocumentFragment doesn't have a getElementsByTagName. But it's children do. > Insert your stuff into a dummy div instead of directly onto the fragment, and > poof, getElementsByTagName. > > And if you don't want to do that then use > `jQuery(fragment.childNodes).find('h2');`. I'd have to put checks into it to make sure that the h2 is a direct child of mw-content anyway, it would probably be slower, and of course I'd have to rewrite that section of the script... It would probably be possible to make the script work without an ID available and remove whatever bugs, but leaving the direct parent of the actual content of the page inaccessible from JS is generally a very bad idea, in my opinion. (BTW, mw.util.$content is no longer accurate for most purposes.) -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
