Skip to content

T1464 #466

Closed
wants to merge 2 commits into from

4 participants

@dseif
Mozilla member
dseif commented Jun 12, 2012

...corn scripts. Made sure we snapshot the page before any of our popcorn scripts load

@dseif dseif [#1464] Added a whitelist with `data-butter-include` on all inserted …
…popcorn scripts. Made sure we snapshot the page before any of our popcorn scripts load
3dad8fd
@cadecairos cadecairos commented on the diff Jun 12, 2012
src/core/page.js
toExclude = Array.prototype.slice.call( head.querySelectorAll( "*[data-butter-exclude]" ) );
+ toInclude = Array.prototype.slice.call( document.head.querySelectorAll( "*[data-butter-include]" ) );
@cadecairos
Mozilla member
cadecairos added a note Jun 12, 2012

toInclude is leaking to the global scope

@dseif
Mozilla member
dseif added a note Jun 12, 2012

ah, my bad

@cadecairos
Mozilla member
cadecairos added a note Jun 12, 2012

document.head.querySelectorAll( "*[data-butter-include]" ) => head.querySelectorAll( "*[data-butter-include]" )

@dseif
Mozilla member
dseif added a note Jun 12, 2012

nope we want document.head, as head is a snapshotted clone from earlier. We want all of the scripts with data-butter-include that weren't snapshotted.

@dseif
Mozilla member
dseif added a note Jun 12, 2012

Yea I don't know about the line above, let me do some testing and report back

@dseif
Mozilla member
dseif added a note Jun 12, 2012

Yea, head should have basically everything except for the popcorn scripts at this point ( if it was snapshotted ). If it wasn't snapshotted then everything just goes along as normal, so this is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dseif dseif [#1464] Fixed issue where we were removing data-butter-include off th…
…e actual attribute instead of the clone
d7f9164
@mjschranz
Mozilla member

/botio check

@ghost
ghost commented Jun 12, 2012

From: Bot.io (butyr.org)


Received

Command cmd_check from @mjschranz received. Current queue size: 0

Live output at: http://botio.butyr.org:8000/9b5106da2bcc28f/output.txt

@ghost
ghost commented Jun 12, 2012

From: Bot.io (butyr.org)


Success

Full output at http://botio.butyr.org:8000/9b5106da2bcc28f/output.txt

Total script time: 0.63 mins

@mjschranz
Mozilla member

/botio preview

@ghost
ghost commented Jun 12, 2012

From: Bot.io (butyr.org)


Received

Command cmd_preview from @mjschranz received. Current queue size: 0

Live output at: http://botio.butyr.org:8000/3ee2d6d05a4a2b8/output.txt

@ghost
ghost commented Jun 12, 2012

From: Bot.io (butyr.org)


Success

Full output at http://botio.butyr.org:8000/3ee2d6d05a4a2b8/output.txt

Total script time: 0.68 mins

Server is running on http://pr466.butyr.org/templates/test.html

@jbuck
Mozilla member
jbuck commented Aug 22, 2012

wont-fixed in Lighthouse

@jbuck jbuck closed this Aug 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.