Skip to content

Added viewport support and defered execution on gopherjs serve #860

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

Merged
merged 2 commits into from
Oct 3, 2018
Merged

Added viewport support and defered execution on gopherjs serve #860

merged 2 commits into from
Oct 3, 2018

Conversation

AnikHasibul
Copy link
Contributor

viewport

Added <meta name="viewport" content="initial-scale=1"> for responsive web development environment with gopherjs via gopherjs serve command!

Deferred execution

<script defer src="`+base+`.js"></script>`

Added defer to execute the script as soon as the page load finished!

tool.go Outdated
<script defer src="`+base+`.js"></script>
</head>
<body></body>
</html>`)), nil
Copy link
Member

@hajimehoshi hajimehoshi Sep 30, 2018

Choose a reason for hiding this comment

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

No tabs before <body> and </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.

Should I push a new commit with perfect indentation?
Or should I leave it for you or other contributors?

Copy link
Member

Choose a reason for hiding this comment

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

Please add a new commit, and wait for another contributor's review.

Copy link
Member

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

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

I don't have a strong opinion on this change, then lgtm.

@hajimehoshi
Copy link
Member

I think it is ok to merge this, and revert this if we find problems.

@hajimehoshi hajimehoshi merged commit bf5fc7d into gopherjs:master Oct 3, 2018
@dmitshur
Copy link
Member

dmitshur commented Oct 3, 2018

I tried to add defer to the script in #570, but aborted because @neelance pointed out a valid problem with it in #570 (comment). I confirmed it in #570 (comment).

Then I opened #571 to discuss the situation and look for a good solution that didn't compromise on the no-flash goal.

It seems this PR is a duplicate of #570, except it also adds a viewport and whitespace.

Sorry I didn't see it earlier @hajimehoshi.

@hajimehoshi
Copy link
Member

hajimehoshi commented Oct 3, 2018

Ah I understood. Sorry I didn't wait for your reviews. Should we revert this?

@dmitshur
Copy link
Member

dmitshur commented Oct 4, 2018

Should we revert this?

Yes, I think so. The problems with this approach are already known, so it's not necessary to wait to discover them. It's hard to find a good default index.html that will work for everyone needs, so I think it's fair to supply a minimal one. Projects can always provide their own custom index.html if they need to override some behavior.

Sorry I didn't wait for your reviews.

No problem, I'm glad you're taking action and following up on it!

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.

3 participants