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

dart:html Document missing documentElement attribute #2290

Closed
sethladd opened this issue Mar 24, 2012 · 4 comments
Closed

dart:html Document missing documentElement attribute #2290

sethladd opened this issue Mar 24, 2012 · 4 comments
Assignees

Comments

@sethladd
Copy link
Contributor

The Document object has a documentElement attribute. See MDN docs here: https://developer.mozilla.org/en/DOM/document.documentElement

However, our dart:html Document object is missing this. http://api.dartlang.org/html/Document.html

Use case: generating a document instance from XSLT and getting a handle on the document.documentElement object.

@sethladd
Copy link
Contributor Author

Example code that I'd like to work:

    var processor = new XSLTProcessor();
    processor.importStylesheet(xsltContents);
    var result = processor.transformToDocument(xmlContents);
    document.query('#meat').nodes.add(result.documentElement);

@sethladd
Copy link
Contributor Author

Update, I worked around this issue with the following code:

#import('dart:dom');
    var processor = new XSLTProcessor();
    processor.importStylesheet(xsltContents);
    var result = processor.transformToFragment(xmlContents, document);
    var destination = document.getElementById('meat');
    destination.innerHTML = '';
    destination.appendChild(result);

Regardless, it sounds like documentElement might come back. I will leave this open.


cc @jacob314.

@dgrove
Copy link
Contributor

dgrove commented Mar 26, 2012

Set owner to @jacob314.

@jacob314
Copy link
Member

Document now supports documentElement


Added Fixed label.

dart-bot pushed a commit that referenced this issue Jan 16, 2020
New commits included in this revision:
```
$ git log --pretty=oneline 4d8ecbd409d773fec47da33b7e6c8db0b51487fd..429a06039d185149f387a65e3503b0693ce6d24e
429a06039d185149f387a65e3503b0693ce6d24e (HEAD -> master, origin/master, origin/HEAD) Parallel fetching of available versions (#2280)
6705b085b9bf4754a4c8002a070f436f115dc4d1 Retry on all SocketExceptions (#2254)
a1820273b9f3c7bb5a13d26cd14d30d5bab187ae Use a unqiue file name for the snapshot during testing. (#2303)
72686563e767f8a359e48a267a2c323953a6a0ef Include osx and windows testing on Travis (#2299)
a7a66821d13920b9b22cc394dfa55c679e971e40 Fail travis for lints and warnings (#2301)
25aa24c023453f064dad8f3cce1bbd55269d0efa Omit languageVersion when there is no SDK constraint (#2300)
82e60a3dcb3afe753563e7d304827fb650bc4833 Use LOCALAPPDATA for system cache on windows (#2297)
ceaa86f2c7eb35f044b4c202268a17361de68d13 Enforce and fix lints from package:pedantic (#2291)
6ce1606564352c305bd0f6d97704f0f7f6ebbca0 Use more collection literals for args (#2293)
be245e6baeebb71aaf3b3a260fcfbbb011a9a7e0 Rename some test utilities from Mock to Fake (#2294)
f7638ce85298df7d9e73d717dd4d81f499681720 Refactor Set.add following !Set.contains (#2295)
390022b24bc076cb934385936ac7904f045a75ba Filter out `null` from `getCachedPackages`. (#2292)
0eea0c4421ed0b83c8597b62dacf68b93de172b9 Fix existing hints and lints (#2290)
7cf2fe860a40517ccb65f5efdda9e4dc350142c3 promote strict deps failures to errors from warnings (#2289)
```

Change-Id: I62782b29e16092114940df00811bfdd20c8045fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131839
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
copybara-service bot pushed a commit that referenced this issue Dec 1, 2023
…ocess, vector_math, web, webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

native (https://github.com/dart-lang/native/compare/0051e78..b5827f3):
  b5827f3b  2023-11-29  Daco Harkes  [infra] Hide TODOs from problems view in VSCode (#837)
  17487159  2023-11-29  Liam Appelbe  [ffigen] Only use `objc_msgSend` variants on x64 (#836)
  50b6a783  2023-11-28  Ryan Macnak  [native_toolchain_c] Setup Android RISCV64 toolchain. (#165)
  aa58de61  2023-11-28  Daco Harkes  [native] Bump deps (#834)
  6cf4c783  2023-11-28  Daco Harkes  [native_assets_builder] Only build native assets for dependencies of requested package (#833)
  f1221814  2023-11-28  Daco Harkes  [ffigen][infra] Use Apple silicon on CI (#832)

source_span (https://github.com/dart-lang/source_span/compare/ed16e0d..9398e24):
  9398e24  2023-11-29  Kevin Moore  Move to latest lints, require Dart 3.1 (#106)

stack_trace (https://github.com/dart-lang/stack_trace/compare/6496ff8..4abff44):
  4abff44  2023-11-29  Kevin Moore  Latest lints, require Dart ^3.1 (#146)

test_descriptor (https://github.com/dart-lang/test_descriptor/compare/c417cbb..59ce97f):
  59ce97f  2023-11-29  Kevin Moore  Bump and fix latest lints, require Dart 3.1 (#60)

test_process (https://github.com/dart-lang/test_process/compare/c21e40d..d68de5b):
  d68de5b  2023-11-29  Kevin Moore  Update lints, require Dart ^3.1 (#52)

vector_math (https://github.com/google/vector_math.dart/compare/e4066cc..cca3cf1):
  cca3cf1  2023-11-27  Devon Carew  Update README.md (#308)

web (https://github.com/dart-lang/web/compare/fdfbaef..cffc2e3):
  cffc2e3  2023-11-30  Devon Carew  parse spec info for generated libraries (#111)
  d902401  2023-11-29  Devon Carew  update the readme (#110)
  e5be5b3  2023-11-28  Devon Carew  delete previously generated files when generating (#108)

webdev (https://github.com/dart-lang/webdev/compare/6961b20..63e09e5):
  63e09e50  2023-11-30  Elliott Brooks  Remove unused scripting code and permission (#2294)
  8c225550  2023-11-29  Elliott Brooks  Prepare Dart Debug Extension for MV3 release (#2293)
  3bb4a6a6  2023-11-28  Elliott Brooks  Remove old code from before the new Dart Debug Extension (#2290)

Change-Id: Ia219625dce03494620a73272e8d1bde03e2e8aea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339222
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
This issue was closed.
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

No branches or pull requests

3 participants