Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create onMounting hook #6

Closed
wants to merge 5 commits into from
Closed

Create onMounting hook #6

wants to merge 5 commits into from

Conversation

tamb
Copy link
Contributor

@tamb tamb commented Aug 24, 2019

This hook fires before every content change. This way we can clean up any assets we may want to clean up before content changes.

@rumkin rumkin self-requested a review August 25, 2019 10:13
@rumkin
Copy link
Owner

rumkin commented Sep 1, 2019

Just have reviewed the PR. Currently it has conflicts. Could you clean it up and remove anything not related to the changed behavior itself?

onLoading(url)
}

function onClick (e) {
if (e.target.nodeName !== 'A') {
if (e.target.nodeName !== 'A' && !e.target.dataset.pillIgnore) {
Copy link
Owner

Choose a reason for hiding this comment

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

Should be removed, it has already landed in another PR.

@@ -162,6 +169,11 @@ will be served by browser.

Determine wether previuosly loaded page should be loaded from server.


Copy link
Owner

Choose a reason for hiding this comment

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

It conflicts with already existing PR.

"rollup": "^1.7.4",
"serve": "^10.1.2"
},
"scripts": {
"start": "serve -l 8080 -n example",
"start": "npm run build && node copy-files.js && serve -l 8080 -n example",
"clean": "rm -rf dist",
Copy link
Owner

Choose a reason for hiding this comment

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

Presented in PR #10

@@ -0,0 +1,3 @@
const copy = require('copy');

copy('dist/*.js', 'example', ()=> console.log('copied pill.js build into example'));
Copy link
Owner

Choose a reason for hiding this comment

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

This part should be removed. It's presented in PR #10.

<p>
<a name="anchor"></a> <span>Anchor</span> <a href="/pages/a">Page A</a>
</p>
</main>
</div>
<!-- PAGE CONTENT END -->
<script src='/site.js' type='module'></script>
Copy link
Owner

Choose a reason for hiding this comment

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

Presented in PR #9

</div>
<!-- PAGE CONTENT END -->
<script src='/site.js' type='module'></script>
</body>
</html>
Copy link
Owner

Choose a reason for hiding this comment

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

Presented in PR #9

</div>
<!-- PAGE CONTENT END -->
<script src='/site.js' type='module'></script>
</body>
</html>
Copy link
Owner

Choose a reason for hiding this comment

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

Presented in PR #9

@@ -1,4 +1,4 @@
import pill from '/pill.js'

Copy link
Owner

Choose a reason for hiding this comment

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

Conflicts with PR #9

@tamb
Copy link
Contributor Author

tamb commented Sep 2, 2019

@rumkin Question: Should this be onMounting or onLoading? And the fetching of the page is onFetch?? What naming would you want?
Currently it would be
onMounting onLoading

But I feel it should be onMounting/onLoading and onFetch

@tamb tamb closed this Sep 2, 2019
@rumkin
Copy link
Owner

rumkin commented Sep 2, 2019

@tamb Let's implement only onMounting hook in this PR. I have some doubts about onFetch interface.

@rumkin rumkin linked an issue Jul 25, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Research History manipulation influence and Form data
2 participants