-
Notifications
You must be signed in to change notification settings - Fork 146
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
Allow Scripts and Styles in all Response Locations #24
Labels
Milestone
Comments
Work is already in progress on this issue and was started in 5186b2b |
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 2, 2014
(This was missed in 5186b2b.) Add tests to ensure response processing for html applies to both the new "body" field and the deprecated "html" field. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 2, 2014
(This was missed in 5186b2b.) Add tests to ensure response processing for html applies to both the new `body` field and the deprecated `html` field. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 2, 2014
Instead of having two methods for parsing scripts and styles, consolidate them. This also unifies the parse result object, which will allow installation of scripts and styles from any fragment in the future. Make the parsing logic much more robust, handling both HTML4 and HTML5 styles, as well as oddities like spaces and single quotes. For now, guard using the new method behind a `experimental-extract-unified` config. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 2, 2014
Instead of having two methods for parsing scripts and styles, consolidate them. This also unifies the parse result object, which will allow installation of scripts and styles from any fragment in the future. For now, guard the new method behind a `experimental-extract-unified` config. Also, make the parsing logic much more robust, handling both HTML4 and HTML5 formats, as well as oddities like spaces and single quotes. Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 2, 2014
Instead of having two methods for parsing scripts and styles, consolidate them. This also unifies the parse result object, which will allow installation of scripts and styles from any fragment in the future. For now, guard the new method behind a `experimental-extract-unified` config. Also, make the parsing logic much more robust, handling both HTML4 and HTML5 formats, as well as oddities like spaces and single quotes. Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 5, 2014
Instead of having two methods for parsing scripts and styles, consolidate them. This also unifies the parse result object, which will allow installation of scripts and styles from any fragment in the future. For now, guard the new method behind a `experimental-extract-unified` config. Also, make the parsing logic much more robust, handling both HTML4 and HTML5 formats, as well as oddities like spaces and single quotes. Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 5, 2014
Instead of having two methods for parsing scripts and styles, consolidate them. This also unifies the parse result object, which will allow installation of scripts and styles from any fragment in the future. For now, guard the new method behind a `experimental-extract-unified` config. Also, make the parsing logic much more robust, handling both HTML4 and HTML5 formats, as well as oddities like spaces and single quotes. Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 5, 2014
- Consolidate parsing scripts and styles from two methods to one. - Unify the parse result object for scripts and styles. - Parse and install scripts and styles from all fragments. - For now, guard behind a `experimental-extract-unified` config. - Improve parsing logic, handling HTML4/HTML5 formats and irregularities. - Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 5, 2014
- Consolidate parsing scripts and styles from two methods to one. - Unify the parse result object for scripts and styles. - Parse and install scripts and styles from all fragments. - For now, guard behind a `experimental-extract-unified` config. - Improve parsing logic, handling HTML4/HTML5 formats and irregularities. - Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 5, 2014
- Consolidate parsing scripts and styles from two methods to one. - Unify the parse result object for scripts and styles. - Parse and install scripts and styles from all fragments. - For now, guard behind a `experimental-extract-unified` config. - Improve parsing logic, handling HTML4/HTML5 formats and irregularities. - Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 13, 2014
- Consolidate parsing scripts and styles from two methods to one. - Unify the parse result object for scripts and styles. - Parse and install scripts and styles from all fragments. - For now, guard behind a `experimental-extract-unified` config. - Improve parsing logic, handling HTML4/HTML5 formats and irregularities. - Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 13, 2014
- Consolidate parsing scripts and styles from two methods to one. - Unify the parse result object for scripts and styles. - Parse and install scripts and styles from all fragments. - For now, guard behind a `experimental-extract-unified` config. - Improve parsing logic, handling HTML4/HTML5 formats and irregularities. - Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 13, 2014
- Consolidate parsing scripts and styles from two methods to one. - Unify the parse result object for scripts and styles. - Parse and install scripts and styles from all fragments. - For now, guard behind a `experimental-extract-unified` config. - Improve parsing logic, handling HTML4/HTML5 formats and irregularities. - Add tests. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 19, 2014
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Aug 21, 2014
The response key was removed in c20d48c. Progress on youtube#24.
nicksay
added a commit
to nicksay/spfjs
that referenced
this issue
Sep 29, 2014
Now that #91 is merged, this issues is almost closed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Allow Scripts and Styles in all Response Locations
Current
Response processing is currently:
title
— Update document titleurl
— Update document urlcss
— Install page-wide stylesattr
— Set element attributeshtml
— Set element content and install element scripts (styles handled by browser).js
— Install page-wide scriptsIssue
In a standard response, styles and scripts can be placed anywhere. In the current SPF response, styles cannot be placed in the foot and scripts cannot be place in the head. While this generally "best practice", executing scripts early is also a common need (e.g. async script loading, google analytics, web font loading, etc). The current SPF behavior diverges from standard behavior, which is unexpected.
Proposal
To make this more uniform, update processing to install page-wide scripts and styles in both steps 3 and 6. To make this more clear, rename
css
tohead
,html
tobody
, andjs
tofoot
. Response processing would then be:title
— Update document titleurl
— Update document urlhead
— Install early page-wide scripts and stylesattr
— Set element attributesbody
— Set element content and install element scripts and stylesfoot
— Install late page-wide scripts and stylesAlso, whereas before we let the browser automatically install and uninstall styles that occur in
body
fragments, since scripts are not natively supported, we parse and execute them. This activates SPF's version handling and execution logic for scripts, whereas styles don't get this. Make this consistent by treating styles inbody
fragments in the same way as we would inhead
orfoot
fragments.The text was updated successfully, but these errors were encountered: