Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

iframe support #14

Merged
merged 18 commits into from Apr 22, 2016
Merged

iframe support #14

merged 18 commits into from Apr 22, 2016

Conversation

johnbender
Copy link
Contributor

No description provided.

@@ -26,6 +26,7 @@
"test": "grunt qunit"
},
"devDependencies": {
"grunt": "~0.4.5"
"grunt": "~0.3.17",
"grunt-cli": "~0.1.13"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing the grunt dependencies so an npm install will get a working installation. Not related to the PR but necessary for a working build.

var body = document.querySelector("body");

// use the passed information to populate the page
body.innerHTML = data.html;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the snippet html to the body. It occurs to me now that there might be a race condition here where the snippet has to make it into the body before DOM ready so that the enhance events and anything else will run.

@johnbender
Copy link
Contributor Author

@zachleat

Demo added to index.html

@zachleat
Copy link
Member

As @johnbender noted here there may be issues that will be solved by triggering enhance on content passed to the iframe. The code might be simplified by putting shoestring itself inside the iframe (for triggering) but I wonder also if you could abuse window.top somehow to re-use the DOM library that likely exists there. Anyway, as discussed, we’ll merge this for now and cross that bridge later.

@zachleat zachleat merged commit 10996d9 into master Apr 22, 2016
@zachleat zachleat deleted the 13 branch April 22, 2016 15:52
@johnbender johnbender restored the 13 branch May 14, 2016 19:12
@johnbender
Copy link
Contributor Author

@zachleat

We have external projects that depend on the branch. I restored it and them I'm going to fix this in master of those proejcts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants