- From: Alexei Barantsev <barancev@gmail.com>
- Date: Tue, 21 Apr 2015 21:42:25 +0300
- Cc: "public-browser-tools-testing@w3.org" <public-browser-tools-testing@w3.org>
- Message-ID: <CAF5xrgmuZ0Jd4Pn_k7NEidpe2hjUuKhn4=7gctWBqUKua_o5Ag@mail.gmail.com>
ᐧ Yes, this looks like moving the whole atom to the client side :) -- Alexei Barantsev, Software-Testing.Ru mailto: barancev@gmail.com phone: +7 (916) 726-95-55 skype : barancev 2015-04-21 20:37 GMT+03:00 Jason Leyba <jleyba@google.com>: > Every browser should be covered by outerHTML or XMLSerializer. If you want > to be paranoid, you can add an extra clause to clone the tree (ouch) as a > child of another node and return the innerHTML: > > var source = document.documentElement.outerHTML; > if (!source) { > if (typeof XMLSerializer !== 'undefined') { > source = new XMLSerializer().serializeToString(document); > } else { > var div = document.createElement('div'); > div.appendChild(document.documentElement.cloneNode(true)); > source = div.innerHTML; > } > } > return source; > > On Tue, Apr 21, 2015 at 10:09 AM Luke Inman-Semerau < > luke.semerau@gmail.com> wrote: > >> That works on "everything"? Do we care about htmlUnit? (That's a bit of a >> rhetorical question) >> >> -Luke >> >> > On Apr 21, 2015, at 9:42 AM, James Graham <james@hoppipolla.co.uk> >> wrote: >> > >> >> On 21/04/15 17:28, Luke Inman-Semerau wrote: >> >> So the local end needs to be context aware of what browser it is >> >> running? Or we basically include a page source Atom on the client and >> >> push the whole thing across the wire to handle all browsers? >> > >> > No, of course not. >> > >> > var source = document.documentElement.outerHTML; >> > if (!source) { >> > source = new XMLSerializer().serializeToString(document); >> > } >> > return source; >> > >> > >> > >> >>
Received on Tuesday, 21 April 2015 18:43:06 UTC