Skip to content

Commit

Permalink
Finish playground execution after retrieving the result.
Browse files Browse the repository at this point in the history
Just learned this was a thing you could do!
  • Loading branch information
nolanw committed May 26, 2017
1 parent 2db0459 commit 89a1d1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HTMLReader.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ URLSession.shared.dataTask(with: URL(string: homepage)!) { (data, response, erro
}

print(div.textContent.trimmingCharacters(in: .whitespacesAndNewlines))


PlaygroundPage.current.finishExecution()
}.resume()

PlaygroundPage.current.needsIndefiniteExecution = true

0 comments on commit 89a1d1f

Please sign in to comment.