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

Public API for setting DOM adapter #4942

Closed
pkozlowski-opensource opened this issue Oct 27, 2015 · 8 comments
Closed

Public API for setting DOM adapter #4942

pkozlowski-opensource opened this issue Oct 27, 2015 · 8 comments

Comments

@pkozlowski-opensource
Copy link
Member

Currently there are several places where we need to set a DOM adapter (server-side rendering, web-worker, testing) and we don't have public API for this. What is done today is some variant of:

System.import('angular2/src/core/dom/browser_adapter').then(function(browser_adapter) {
  browser_adapter.BrowserDomAdapter.makeCurrent();
})

We need to decide upon public API for selecting platform-specific DOM adapter

@pkozlowski-opensource
Copy link
Member Author

//cc: @IgorMinar

@tbosch
Copy link
Contributor

tbosch commented Oct 28, 2015

Eventually, we won't need DomAdapters any more:

  1. for parsing, we use our custom html parser which does not need the DOM
    at all
  2. we should have special renderers for every platform (browser,
    serverside, ...)

On Tue, Oct 27, 2015 at 8:57 AM Pawel Kozlowski notifications@github.com
wrote:

//cc: @IgorMinar https://github.com/IgorMinar


Reply to this email directly or view it on GitHub
#4942 (comment).

@JohannesHoppe
Copy link
Contributor

FYI

since alpha-47 the
angular2/src/core/dom/browser_adapter is now located at
angular2/src/platform/browser/browser_adapter

System.import('angular2/src/platform/browser/browser_adapter').then(function(browser_adapter) {
  browser_adapter.BrowserDomAdapter.makeCurrent();
})

@pkozlowski-opensource
Copy link
Member Author

I don't even remember what this one was about and why I've even opened this, so closing for now.

@cexbrayat
Copy link
Member

@pkozlowski-opensource We have to use this for testing purpose, maybe the idea was to have a cleaner API for this?

@JohannesHoppe
Copy link
Contributor

Yes, exactly. Is browser_adapter.BrowserDomAdapter.makeCurrent(); really the supposed public API?

@IgorMinar
Copy link
Contributor

In the past the BrowserDomAdapter was a private api but that got fixed
during the barrel reorganization.
On Thu, Dec 17, 2015 at 3:29 AM Johannes Hoppe notifications@github.com
wrote:

Yes, exactly. Is browser_adapter.BrowserDomAdapter.makeCurrent(); really
the supposed public API?


Reply to this email directly or view it on GitHub
#4942 (comment).

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants