Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(angularInit): allow auto-bootstraping from inline script #15571

Closed

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Jan 3, 2017

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix.

What is the current behavior? (You can also link to an open issue here)
Some browsers (e.g. Safari 9.x, PhantomJS) do not set link.origin/protocol correctly, when setting link.href to null, which prevents auto-bootstraping Angular from scripts without a src attribute (i.e. inline scripts).
See also #15567.

What is the new behavior (if this is a feature change)?
Auto-bootstraping Angular from inline scripts is allowed.

Does this PR introduce a breaking change?
No.

Please check if the PR fulfills these requirements

Other information:
Inline scripts are on the same origin as the loading page, so auto-bootstraping
should be allowed.

Fixes #15567.

Some browsers (e.g. Safari 9.x, PhantomJS) do not set `link.origin/protocol`
correctly, when setting `link.href` to `null`, which prevented auto-bootstraping
Angular from scripts without a `src` attribute (i.e. inline scripts).
Inline scripts are on the same origin as the loading page, so auto-bootstraping
should be allowed.

Fixes angular#15567
@gkalpak
Copy link
Member Author

gkalpak commented Jan 3, 2017

cc @mprobst

@gkalpak gkalpak closed this in 0694af8 Jan 3, 2017
gkalpak added a commit that referenced this pull request Jan 3, 2017
Some browsers (e.g. Safari 9.x, PhantomJS) do not set `link.origin/protocol`
correctly, when setting `link.href` to `null`, which prevented auto-bootstraping
Angular from scripts without a `src` attribute (i.e. inline scripts).
Inline scripts are on the same origin as the loading page, so auto-bootstraping
should be allowed.

Fixes #15567

Closes #15571
@gkalpak gkalpak deleted the fix-bootstrap-allow-inline-script branch January 3, 2017 17:26
gkalpak added a commit that referenced this pull request Jan 3, 2017
Some browsers (e.g. Safari 9.x, PhantomJS) do not set `link.origin/protocol`
correctly, when setting `link.href` to `null`, which prevented auto-bootstraping
Angular from scripts without a `src` attribute (i.e. inline scripts).
Inline scripts are on the same origin as the loading page, so auto-bootstraping
should be allowed.

Fixes #15567

Closes #15571
ellimist pushed a commit to ellimist/angular.js that referenced this pull request Mar 15, 2017
Some browsers (e.g. Safari 9.x, PhantomJS) do not set `link.origin/protocol`
correctly, when setting `link.href` to `null`, which prevented auto-bootstraping
Angular from scripts without a `src` attribute (i.e. inline scripts).
Inline scripts are on the same origin as the loading page, so auto-bootstraping
should be allowed.

Fixes angular#15567

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

Successfully merging this pull request may close these issues.

Disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match
4 participants